我正在动态地致电twitter以获取网站上的小部件。 http://twitter.com/about/resources/widgets/widget_searchTwitter搜索框小部件
而不是用户从上面的网站获取代码,我给一个文本框输入相同的细节,以获得Twitter搜索部件框。
我能够获取推文,但它删除了以前的内容,并且已经在页面上,并且只使用twitter提要更新了同一页面。 下面是代码:
<label>Enter Search Keyword:</label>
<input type="text" id="twtKeyword"/>
<br/><br/>
<label>Enter Title:</label>
<input type="text" id="twtTitle"/>
<br/><br/>
<label>Enter Subject:</label>
<input type="text" id="twtSubject"/>
<br/><br/>
<input type="button" id="twtBtnClick" value="Click" onclick="getPageTwitter();"></input>
function getPageTwitter()
{
var searchWord=document.getElementById("twtKeyword").value;
var titleTwt=document.getElementById("twtTitle").value;
var subjectTwt=document.getElementById("twtSubject").value;
$("#twitterWidget").dialog("close");
new TWTR.Widget({
version: 2,
type: 'search',
search: searchWord,
interval: 6000,
title: titleTwt,
subject: subjectTwt,
width: 250,
height: 300,
theme: {
shell: {
background: '#8ec1da',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
toptweets: true,
behavior: 'default'
}
}).render().start();
}
但我想小部件留在同一个页面,而不影响页面
非常感谢它真棒,我访问了网站,但它必须在我的情况下,动态应用。我该怎么做。请分享一些提示和你的想法。那太好了。 – 2011-08-03 04:28:26
感谢您的赞扬:-)您能解释更多关于动态应用吗?我会尽我所能提供帮助 – Nalcro 2011-08-03 10:19:19