我需要一種方法來檢索遠程網頁的標題。我在互聯網上發現了這個js,但是 有人可以告訴我「$ .request(」fetch_title「,{url:c})」在這個函數中做了什麼:?如何檢索JavaScript中的頁面標題?
function fetch_title() {
var a = $("#url-field"),
b = a.find(".NO_URL"),
a = a.find(".title-status"),
c = $("#url").val();
if (c) {
if (!$('form#newlink textarea[name="title"]').val() || confirm("This will replace your existing title, proceed?"))
a.show().text(reddit.status_msg.loading),
b.hide(),
$.request("fetch_title", { url: c })
} else a.hide(), b.show().text("a url is required")
}
這是斷章取義的。你能提供你使用的那個圖書館的名字嗎? – 2013-03-13 10:50:02