我想将twitter给我的一些代码转换成一个单独的.js文件。 这就是他们给我的。
document.write("<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: '@BigNotch',
interval: 6000,
title: 'Follow Me On Twitter',
subject: 'BigNotch',
width: 180,
height: 300,
theme: {
shell: {
background: '#17d1ff',
color: '#ff8fda'
},
tweets: {
background: '#ededed',
color: '#383838',
links: '#ff8aed'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
toptweets: true,
behavior: 'default'
}
}).render().start();
</script>
我创建了一个单独的.js文件,只是复制了它之间的内容
<script></script>
并将其粘贴到.js文件中。 这是正确的方法吗?