我有一个javascript代码:
javascript: function iptxt() {
var d = document;
try {
if (!d.body) throw (0);
window.location = 'http://www.instapaper.com/text?u=' + encodeURIComponent(d.location.href);
} catch (e) {
alert('Please wait until the page has loaded.');
}
}
iptxt();
void(0)
我会这样使用它:
< href="javascript:function iptxt(){var d=document;try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u='+encodeURIComponent(d.location.href);}catch(e){alert('Please wait until the page has loaded.');}}iptxt();void(0)">Go</a>
但我想将此代码与 jquery 一起使用,如下所示:
<a href="#" id="go">Go</a>
以及将与 id go 集成的 jquery 代码是什么。
谢谢。