- 论坛徽章:
- 0
|
本帖最后由 edns 于 2010-02-09 16:43 编辑
a1.js
----------
function ShowModelDialog1(url){
var iWidth=600; //窗口宽度
var iHeight=400;//窗口高度
var iTop=(window.screen.height-iHeight)/2;
var iLeft=(window.screen.width-iWidth)/2;
window.showModalDialog(url,window,"dialogHeight: "+iHeight+"px;dialogWidth: "+iWidth+"px;dialogTop: "+iTop+"; dialogLeft: "+iLeft+"; resizable: no; status: no;scroll:no");
}
1.php
-----------
<a href="#" onclick="return ShowModelDialog1('2.php')">insert </a>
2.php
-------------
<form name="form1" method="get" action="3.php" >
3.php
-----------
<head>
<base target="_self">
</head>
<body>
<?php
$testdb=mysql_connect("localhost","root","123456");
mysql_select_db("mywebdb",$testdb);
$zc_id=$_GET['zc_id'];
$sqlstr="INSERT INTO abc (zc_id) VALUES('".$zc_id."')";
mysql_query($sqlstr,$db);
?>
<script>this.window.close();</script>
</body>
===========
为什么自动关闭3.php页面,还要返回一个提示,问我要不要关闭???(我的是ie5,在ie6,ie8中能正常关闭)
请高手指点! 多谢!!!
预祝大家新年快乐,万事顺心!!! |
|