0
我爲得到RSS這個代碼從其他網站插入到數據的基礎上由JavaScript
gfeedfetcher.prototype._displayresult=function(feeds){
var rssoutput=(this.itemcontainer=="<li>")? "<ul>\n" : ""
gfeedfetcher._sortarray(feeds, this.sortstring)
for (var i=0; i<feeds.length; i++){
var itemtitle="<a href=\"" + feeds[i].link + "\" target=\"" + this.linktarget + "\" class=\"titlefield\">" + feeds[i].title + "</a>"
var itemlabel=/label/i.test(this.showoptions)? '<span class="labelfield">['+this.feeds[i].ddlabel+']</span>' : " "
var itemdate=gfeedfetcher._formatdate(feeds[i].publishedDate, this.showoptions)
var itemdescription=/description/i.test(this.showoptions)? "<br />"+feeds[i].content : /snippet/i.test(this.showoptions)? "<br />"+feeds[i].contentSnippet : ""
rssoutput+=this.itemcontainer + itemtitle + " " + itemlabel + " " + itemdate + "\n" + itemdescription + this.itemcontainer.replace("<", "</") + "\n\n"
}
rssoutput+=(this.itemcontainer=="<li>")? "</ul>" : ""
this.feedcontainer.innerHTML=rssoutput
}
然後我需要插入標題和新的臨客上表中的數據的基礎這個鱈魚由JavaScript
見這太問題,可能與你想達到什麼相似:http://stackoverflow.com/questions/4139532/insert-data-into-mysql-database-using-javascript- ajax –
不,我有var feeds [i] .link,feeds [i] .title,我不會讓sql插入到數據庫中 –
您還沒有閱讀整篇文章和鏈接的答案部分I給你。你有類似的問題,試圖用JS/jQuery/Ajax處理數據庫數據插入 –