通过form的target标签,使用一个隐藏的iframe提交就可以了
<!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>无标题文档</title>
</head>
<body>
<form method="get" target="test" action="a.html">
<input type="submit" />
</form><iframe name="test"></iframe>
</body>
</html>
<!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>无标题文档</title>
</head>
<body>
<form method="get" target="test" action="a.html">
<input type="submit" />
</form><iframe name="test"></iframe>
</body>
</html>
解决方案 »
- 正则匹配小数,这样子为什么是不对的呢?
- 怎么动态添加下拉框
- 动态添加的input如何前后台取值?
- ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●把函数放到参数里 怎么作用域就变了??????????????????
- 测试表单项提交的值?
- 这是我一年前写的js菜单demo,对js语法不太熟悉。想封装起来,但不知道怎么弄。而且仅支持IE,谁有兴趣拿去改改吧。:)
- 【javascript】【css】请高手解析下这段 经典二级菜单
- !!200分求教!!在showModelessDialog窗口中open一个新窗口时会删除session么??在线等....
- 怎样得到多行文本框中文本的每一行
- 那有javascript的函数说明,电子书下啊
- 小妹求教文本框数组取值
- 送200 帮我测试我做的ajax+asp+javascript用的斗地主程序,看看有什么问题!回贴必送
想要submit而不刷新页面,
在submit()中return false;阻止提交
createXmlHttp();
xmlHttp.open("GET", url, false);
xmlHttp.send(null);