<script>
function a()
{
w=window.open("b.php","mxh","width=200,height=200")
document.formName.target="mxh"
document.formName.submit()
}
</script>
<form name="formName">
<input onclick="a()" value="submit" type=button>
</form>
function a()
{
w=window.open("b.php","mxh","width=200,height=200")
document.formName.target="mxh"
document.formName.submit()
}
</script>
<form name="formName">
<input onclick="a()" value="submit" type=button>
</form>
--------------------
<FORM METHOD=POST ACTION="B.PHP" TARGET="_blank"></FORM>
--------------------
B.PHP
---------------------
<script>
function defineSelfWin()
{
self.window.resizeTo(200,200);
}
</script>
<body onload="defineSelfWin()">
---------------------现在可以实现弹出窗口了,并且改造一下B.PHP就可以实现更具传入参数调整大小
<OBJECT>
在B.php中调用这个IE内部控间可以实现一些针对IE的命令,可能包含工具栏、地址栏的命令。刚刚看到了老孟的办法,比较方便,采用吧。
<script>
function a()
{
document.all.form1.submit;
w=window.open("b.php","target","width=200,height=200")
}
</script>
<form name=form1 method='post' action='b.php' onsubmit='a()' target=target >
<input value="提交" type=submit>
</form>
试试吧!!!
A。php:
<?php
print'<script>
function a()
{
w=window.open("b.php","mxh","width=200,height=200")
document.formName.target="mxh"
document.formName.submit()
}
</script>
';
print"<form name=\"formName\">";
print"<INPUT type=text name=name>";
print"<input onclick=\"a()\" value=\"submit\" type=button>";
print"</form>";
?>B.php:
<?php
print"$name";
?>
这个方法与我以前的思路相像!但是不好用,请孟版主再看一下,谢谢!、
manyou(漫游者)的到是好用啊,两者原理相同,为什么一个可以提交,另一个不可以呢??
谁能解释一下??
----------------------------
还有种更好的方法:
<script>
function a()
{
document.all.form1.submit;
w=window.open("b.php","target","width=200,height=200")
}
</script>
<form name=form1 method='post' action='b.php' onsubmit='a()' target=target >
<input value="提交" type=submit>
</form>
试试吧!!!
--------------------------------
中最好去掉这一句
document.all.form1.submit;
,因为在有些版本浏览器中会造成两次提交。onsubmit意思是在提交表单时触发事件,除非他遇到一个return false,否则就会提交表单。而在加上document.all.form1.submit;这一句就会再次被提交。当然,这种情况只在IE的个别版本中出现(Navigate不知道),我曾经深受其害。