我有一个很简单的页面:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<form action="date.html" target="_blank">
<input type="text" name='date'/>
<input type="submit" />
</form>
</body>
</html>
这个form可以提交一次,第二次就没有反应了!但是在firefox以及Ie里面没有任何问题!
一个google chrome 浏览器的BUG
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
7条回答 默认 最新
- shijiebao 2009-12-17 14:08关注
chrome要求每次请求的路径都要唯一,在请求的路径后面加上一个随机参数就ok了
[code="javascript"]
function openPostWindow(url, keys, values) {
var tempForm = document.createElement("form"), wname = 'temp';
tempForm.id = "form_";
tempForm.method = "post";
tempForm.action = url + '?SeID=' + Math.random();
tempForm.target = wname;
if (keys && values) {
if (keys.length == values.length) {
for (var i = 0; i < keys.length; i++) {
var hideInput = document.createElement("input");
hideInput.type = "hidden";
hideInput.name = keys[i];
hideInput.value = values[i];
tempForm.appendChild(hideInput);
}
} else {
throw 'keys length not equals values length!';
}
}
// openWin('about:blank',wname);
document.body.appendChild(tempForm);
tempForm.submit();
document.body.removeChild(tempForm);
}
[/code]本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 像这种代码要怎么跑起来?
- ¥15 怎么改成循环输入删除(语言-c语言)
- ¥15 安卓C读取/dev/fastpipe屏幕像素数据
- ¥15 pyqt5tools安装失败
- ¥15 mmdetection
- ¥15 nginx代理报502的错误
- ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
- ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
- ¥100 描述一下元器件的基本功能,pcba板的基本原理
- ¥15 STM32无法向设备写入固件