小弟初用php,如何单击单选框触发一个查询动作?急啊 onclik后js里的function跳转到一个php里执行查询。这有意义吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用XMLHTTP方法<script>function getMsg(){ var xml = new ActiveXObject("Microsoft.XMLHTTP"); xml.open("GET","test.php?id=1",false); xml.send(); document.all.msg.innerText = xml.responseText;}</script><p id=msg></p><input type='radio' onclick='getMsg()'>-------------------------test.php<? if (isset($_GET['id'])) { $res =mysql_query("select * from table where id = '".$_GET['id']."'"; $arr = mysql_fetch_array($res); header("Content-Type:text/html;charset=GB2312"); print_r($arr); }?> 噢,看来全世界99%的客户端都装了microsoft的xml包。 <script language="javascript">function gogo(){location.href="next.html";//指向下一个页面}</script><input type='radio' onclick='gogo()'> xampp1.7.7无法打开验证码的图片(验证码的程序本身没有问题。因为我在我的室友那里成功执行了) 急求代码修改 mysql数据库主键作用? 问个问题啊,关于位操作符的 求正则表达式 急问。我想从数据库中查询的数据显示到表格中的问题 请问Php如何将一些特殊字符保存到数据库,数据库是Mysql,数据由页面提交页面 如何在solaris 8下安装apache mysql php 求php教程 如何使用本地函数?就像调用javascript函数一样?怎么我得不行呀? session的问题 pear db 的问题
<script>
function getMsg()
{
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.open("GET","test.php?id=1",false);
xml.send();
document.all.msg.innerText = xml.responseText;
}
</script>
<p id=msg></p>
<input type='radio' onclick='getMsg()'>
-------------------------
test.php
<?
if (isset($_GET['id']))
{
$res =mysql_query("select * from table where id = '".$_GET['id']."'";
$arr = mysql_fetch_array($res);
header("Content-Type:text/html;charset=GB2312");
print_r($arr);
}
?>
function gogo()
{
location.href="next.html";//指向下一个页面
}
</script><input type='radio' onclick='gogo()'>