透过iframe弹出动态地址页面

WBOY
Release: 2016-06-13 12:27:35
Original
1064 people have browsed it

通过iframe弹出动态地址页面
是这样的,我要从lins中提取第一列数据出来(这列数据为a01,a02,a03等等),然后点击该单元格则通过IFRAME弹出editi.php?id=a01;或editi.php?id=a02等等。如仅仅是弹出editi.php,我已经学会了,但是后面多了变量,又不会了。
我自己不懂,下面是我瞎写的,不对。还有,我希望iframe弹出时在屏幕的中央。该怎么办?



 
 include("IncDB.php"); 
$result=mysql_query("SELECT * FROM lins",$link); 
$row=mysql_fetch_row($result);
while($row)
{echo "";//.$row[0]的数据为a01,a02,a03等等,点击该单元格则通过IFRAME弹出editi.php?id=a01;或editi.php?id=a02等等。
$row=mysql_fetch_row($result); 

mysql_close($link); 
?> 
 
'编辑'


<script><br /> function ed(a){<br /> var edit=('editi.php?id=''+a);<br /> document.getElementById(edit).style.display="block";<br /> } <br /> </script>


------解决思路----------------------
function ed(a){
document.getElementById("edit").src="edit.php?id="+a;
}
------解决思路----------------------
你的程序能生成这样的 html 就不会有问题
<table ><br /> <tr><br />  <td width='30' ondblclick='ed("a01")'>编辑</td><br />  <td width='30' ondblclick='ed("a02")'>编辑</td><br />  <td width='30' ondblclick='ed("a03")'>编辑</td><br /> </tr><br /></table><br /><iframe src="editi.php" id="edit" style="position:absolute;height:250;width:450; display:none"  frameborder=1 marginwidth="0" marginheight="0" scrolling="no" z-index=999;></iframe><br /><script type="text/javascript"><br />document.getElementById('edit').style.top = (screen.height-250)/2<br />document.getElementById('edit').style.left = (screen.width-450)/2<br /><br />function ed(a){<br />  document.getElementById('edit').src = 'editi.php?id='+a;<br />  document.getElementById('edit').style.display="block";<br />}	<br /></script><br /></body><br />
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template