0

以下书签在 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();

...有什么想法吗?

编辑:

如果我修改书签并删除弹出窗口部分,它将在 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();

...那么我怎样才能让弹出式书签在 ie8 中工作???

4

0 回答 0