回 帖 发 新 帖 刷新版面

主题:求助,更改JAVASCRIPT

<script LANGUAGE="JavaScript">
if (external.menuArguments){
    var parentwin = external.menuArguments;
    if (parentwin.document.selection) {
        var sel = parentwin.document.selection.createRange().text;
    }    
    if (!sel) {
        var sel = '';
    }    
    var url = parentwin.location.href;
    var title = parentwin.document.title;    
    if (parentwin.event.srcElement.tagName == "A") {
        url = parentwin.event.srcElement.getAttribute("HREF");
        title = parentwin.event.srcElement.innerText;
    }
    void(window.open('icollect.asp#t='+escape(title)+'&u='+escape(url)+'&c='+escape(sel),'_blank','scrollbars=no,width=480,height=460,left=75,top=50,status=no,resizable=yes'))
} else {
    history.go(-1);
}
</script>

希望会JAVASCRIPT 的朋友能帮小弟更改一下void(window.open())里的连接不要将其转向到这个连接页面 而直接给其付一个值一便在本页的asp脚本中调用!
谢谢

回复列表 (共2个回复)

沙发

急!
  在线等!
谢谢!

板凳

[quote]void(window.open('icollect.asp#t='+escape(title)+'&u='+escape(url)+'&c='+escape(sel),'_blank','scrollbars=no,width=480,height=460,left=75,top=50,status=no,resizable=yes'))[/quote]
其中icollect.asp後面如果是"#"那就成了貓點連接了,是不是想傳遞參數,用"?"呢.

如果是直接给其負一个值一便在本页的asp脚本中调用,那可以寫成:
void(window.open('?t='+escape(title)+'&u='+escape(url)+'&c='+escape(sel),'_blank','scrollbars=no,width=480,height=460,left=75,top=50,status=no,resizable=yes'))
再看看這個:
void(window.open('#t='+escape(title)+'&u='+escape(url)+'&c='+escape(sel),'_blank','scrollbars=no,width=480,height=460,left=75,top=50,status=no,resizable=yes'))
試試看吧~!


我這裡打不了中文簡體,真是很抱歉.

我来回复

您尚未登录,请登录后再回复。点此登录或注册