Home > Backend Development > PHP Tutorial > 哪位大神帮忙看下,小弟我做了个弹出层增加的时候没有关问题,但是修改小弟我如何获取数据

哪位大神帮忙看下,小弟我做了个弹出层增加的时候没有关问题,但是修改小弟我如何获取数据

WBOY
Release: 2016-06-13 12:13:02
Original
923 people have browsed it

哪位大神帮忙看下,我做了个弹出层增加的时候没问题,但是修改我怎么获取数据?
有个增加、修改数据我用弹出层进行代替,效果是这样的:
增加没有问题,但是后面我要修改,怎么进行查询数据并在这上面显示呢?

<br />    <script type="text/javascript"><br />      $(document).ready(function() {	<br />        $('#open').click(function() {<br />		  var title = $(this).attr("value");<br />		  $("#add").val(title);<br />          $('#Window1').AeroWindow({			<br />            WindowTitle:          title,<br />            WindowPositionTop:    'center',<br />            WindowPositionLeft:   'center',<br />            WindowWidth:          500,<br />            WindowHeight:         300,<br />            WindowAnimation:      'easeOutCubic'<br />          });<br />        });		<br />      });<br />    </script><br />
Copy after login

<br /><div id="open">添加</div><br /><style><br />	  #Window1{display:none;}<br />    </style><br /> <div id="Window1"><br />      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="wenzhang"><br />		<tr><br />			<td class="bg_f8" align="right" width="110">分类名称:</td><br />			<td><input type="text" name="info[class_name]" value="" class="inputall input200" /></td><br />		</tr><br />		<tr><br />			<td class="bg_f8" align="right">上级分类:</td><br />			<td><br />				<select name="info[class_type]" class="inputselect"><br />								<option value="news" >资讯中心</option><br />								<option value="help" >帮助中心</option><br />								</select><br />			</td><br />		</tr><br />		<tr><br />			<td class="bg_f8" align="right">分类排序:</td><br />			<td><input type="text" name="info[class_order]" id="add" value="" class="inputall input80" /></td><br />		</tr><br />		<tr><br />			<td class="bg_f8"> </td><br />			<td><input type="submit" name="pesubmit" value="提 交" class="tjbtn" /></td><br />		</tr><br />		</table><br />    </div><br />
Copy after login

现在的问题是我怎么在修改的时候查询数据并在这个层上面进行显示?
------解决思路----------------------
楼主先弹出层然后在弹出框架,利用jquery替换框架里面src的值
<div id="window"><iframe id='name1' name='name1' src='a.php'></iframe></div>
Copy after login

jquery代码如下:
<br /><script type="text/javascript"><br />      $(document).ready(function() {   <br />        $('#open').click(function() {<br />          var title = $(this).attr("value");<br />          $("#name1").attr("src","a.php?你自己拼字符");<br />          $('#Window1').AeroWindow({           <br />            WindowTitle:          title,<br />            WindowPositionTop:    'center',<br />            WindowPositionLeft:   'center',<br />            WindowWidth:          500,<br />            WindowHeight:         300,<br />            WindowAnimation:      'easeOutCubic'<br />          });<br />        });       <br />      });<br />    </script><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