在IE中加载页面要求启用cookie的问题

时间:2013-07-18 15:26:41

标签: javascript batch-file cgi

我有一个表单可以在IE中打开一个特定的页面,但它是一个.cgi

/web/guest/en/websys/webArch/authForm.cgi

请看这篇文章:

Adding string to the end of submitted URL?

<input type="text" name="prog_site" id="prog_site" value="http://" />
<a href="http://" onclick="this.href=document.getElementById('prog_site').value" target="_blank">Let's go!</a>

上面的代码是一个输入字段,它使用提交的URL打开一个新选项卡,并添加提供的文件ext。但该页面需要cookie才能使其正常工作。

1 个答案:

答案 0 :(得分:1)

该代码仅在单击时更改href属性,这已经太晚了。 考虑

<input type="text" name="prog_site" id="prog_site" value="http://" 
       onkeyup="document.getElementById('href_target').href=this.value" />
<a id="href_target" href="http://" target="_blank">Let's go!</a>