target和window open在IE中不能一起工作
target and window open not working together in IE
单击链接后,我正试图打开一个新窗口。这将提交表单,并应打开目标中定义的窗口。我在chrome和FF中做得很成功,但在IE中没有。
以下是我的代码:
<form name="myForm" id="myForm" method="get" action="${URL_DOCUMENT}">
<table border=1 cellpadding=1 width="50%" style='table-layout: fixed'
id="table1">
<thead>
<tr>
<th align='left'>Statement Date</th>
</tr>
</thead>
<tbody>
<c:forEach var="statement" items="${list}">
<tr>
<td><a href="" onclick="return callSubmit(this)">
<c:out value="${statement.date}" /> <img
src='/images/dat.png'
alt="" style="border-style: none"> </a></td>
</tr>
</c:forEach>
</tbody>
</table>
<input type="hidden" name="key" id="key" value="" /></form>
<script type="text/javascript">
function callSubmit(link){
var test =link.innerHTML.split("<");
document.getElementById("key").value = test[0];
var w = window.open('','newDocWin','width=500,height=300,titlebar=no,toolbar=no,location=no');
document.getElementById('myForm').submit();
return false;
}
</script>
在IE 2中,窗口被打开了。我定义的窗口和另一个(不确定它从哪里来)。在chrome和FF中,它运行良好(PDF响应在定义的窗口中)我在这里做错了什么吗
它能这么简单吗?
<form action="demo_form.php" method="get" target="_blank">
相关文章:
- 两个独立工作的javascript函数,但不能一起工作
- jquery draggable和resizable在动态生成的元素中不能一起工作
- AngularJS和JS Math.max.apply()不能一起工作
- javascript和php不能一起工作
- 多个 Angular 验证器独立工作,但不能一起工作
- onclick 和 ondblclick 不能一起工作
- 数据切换和onclick不能一起工作,我太新了,无法应用@epascarello的解决方案
- 图像滑块和下拉菜单不能一起工作
- 变量数组+正则表达式不能一起工作
- jQuery .then() 和 success block 不能一起工作
- 两个jquery项不能一起工作
- Bootstrap滚动间谍和粘性导航不能一起工作
- 两个函数don't不能一起工作,但不能出错
- Fancybox 2和滑动滑块不能一起工作
- 两个java脚本不能一起工作
- 更改src和currentTime;我不能一起工作
- 链接和图像不能一起工作
- Knockout.js和敲除验证不能一起工作
- HTML, CSS, JQUERY不能一起工作
- Javascript (canvas) - for循环和drawImage不能一起工作