Javascript bookmarklet不适用于ie8(但适用于Firefox24和Chrome30)

Javascript bookmarklet不适用于ie8(但适用于Firefox24和Chrome30),javascript,internet-explorer-8,bookmarklet,Javascript,Internet Explorer 8,Bookmarklet,下面的bookmarklet在firefox中运行良好,但当我在ie8中单击它时,会弹出一个窗口,但不会显示任何内容(submit.php页面应该在弹出窗口中,并填写网页标题、链接等的正确值) javascript: url = "http://localhost:8080/submit.php"; Q = document.selection ? document.selection.createRange().text : document.getSelection(); L = locat

下面的bookmarklet在firefox中运行良好,但当我在ie8中单击它时,会弹出一个窗口,但不会显示任何内容(submit.php页面应该在弹出窗口中,并填写网页标题、链接等的正确值)

javascript:

url = "http://localhost:8080/submit.php";
Q = document.selection ? document.selection.createRange().text : document.getSelection();
L = location.href;
T = document.title;
pop = window.open("", "addEntry", "scrollbars=no,resizable=yes,
toolbars=yes,width=600,height=650,status=yes");
pop.document.body.appendChild(document.createElement('div')).innerHTML =
    '<form%20name="submitThis"%20method="POST"%20action=' + url + '>
<textarea%20name="title">' + T + '</textarea> <textarea%20name="link">' + L + '</textarea>
<textarea%20name="comnt">' + Q + '</textarea>
<input%20type="hidden"%20name="pActs"%20value="new"></form>';
pop.document.forms['submitThis'].submit();
url=”http://localhost:8080/submit.php";
Q=文件选择?document.selection.createRange().text:document.getSelection();
L=location.href;
T=文件标题;
pop=window.open(“,”addEntry“,”scrollbars=no,resizable=yes,
工具栏=是,宽度=600,高度=650,状态=是”);
pop.document.body.appendChild(document.createElement('div')).innerHTML=
'
“+T+”“+L+”
“+Q+”
';
pop.document.forms['submitThis'].submit();
……有什么想法吗

编辑:

如果我修改bookmarklet并删除弹出窗口部分,它将在ie8中正常工作

javascript:uri="http://localhost:8080/submit.php";Q=document.selection?document.selection.createRange().text:document.getSelection();L=location.href;T=document.title;document.body.appendChild(document.createElement('div')).innerHTML='<form%20name="submitThis"%20method="POST"%20action='+uri+'><textarea%20name="title">'+T+'</textarea><textarea%20name="link">'+L+'</textarea><textarea%20name="comnt">'+Q+'</textarea><input%20type="hidden"%20name="pActs"%20value="new"></form>';document.forms['submitThis'].submit();
javascript:uri=”http://localhost:8080/submit.php";Q=document.selection?document.selection.createRange()。文本:document.getSelection();L=location.href;T=文件标题;document.body.appendChild(document.createElement('div')).innerHTML=''+T+''+L+''+Q+'';document.forms['submitThis'].submit();

…那么,我如何才能让弹出式书签在ie8中工作呢?

使用ie8开发工具,我可以看到当它到达
pop.document.body.appendChild
…我收到消息“不支持这样的接口”。我的猜测是,打开新窗口后,
pop.document.body
由于某种原因尚未准备好。尝试将执行DOM操作的代码包装在
setTimeout()
call.thx中,以获得回复。在使用setTimeout时,我仍然会遇到相同的错误(尽管我可能做错了)。。。我开始认为这是我的ie8和缺少dll的问题(请参阅和)