日期:2014-05-17  浏览次数:20488 次

请教 ******************************
请教下html按钮在html内部调用如何实现 例子如下
<form action="showmarkers.php" method="POST" target='google'>
<TD align="rigter" >City name : <INPUT size=15 name="ncc" class="aa"></TD></TR>
<input type="submit" value="search">
</form>
<br />
</div> //实现按钮功能 并调用php文件 php文件包含地图和数据库等方法
   
<div id="mapContainer" style="height:250px; width:250px;" align="left">
<iframe src="showmarkers.php" width="300" height="300" marginheight="5px" ></iframe></div>//实现从php调用地图

问题:我点击按钮跳到新的页面 而不能作用于iframe调用的地图,如何解决?

------解决方案--------------------
<form action="showmarkers.php" method="POST" target='google'>
<TD align="rigter" >City name : <INPUT size=15 name="ncc" class="aa"></TD></TR>
<input name="按钮" type="button" value="search" onClick="document.getElementById('ditu').src='showmarkers.php?key='+ncc.value;">
</form>
<br />
<script>
</script>
</div> //实现按钮功能 并调用php文件 php文件包含地图和数据库等方法

<div id="mapContainer" style="height:250px; width:250px;" align="left">
<iframe src="showmarkers.php" width="300" height="300" marginheight="5px" id="ditu" ></iframe></div>




蚂蚁学院