想弄个表格,表格里有checkbox 如题,想把数据库读出的数据放个表格里,然后表格每行有个checkbox,选中这个行的checkbox的话,就取出这行的某个列的值,好实现吗?先谢谢大家!我就10分了,真可怜 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 AJAX点击checkbox的动作触发数据读取 JS代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><script language="javascript" type="text/javascript">function checkb(){ if(document.getElementById("checkbox").checked="checked"){ var t = document.getElementById("t"); var b=t.rows[0].cells[1].innerText; alert(b); } }</script><body><table width="100%" border="1" cellspacing="0" cellpadding="0" id="t"> <tr> <td>a</td> <td>b</td> <td> <input type="checkbox" name="checkbox" id="checkbox" onclick="checkb()" /></td> </tr> <tr> <td>c</td> <td>d</td> <td> <input type="checkbox" name="checkbox2" id="checkbox2" /></td> </tr></table></body></html> 我运行MYSQL数据库出现这样的错误是怎么回事 请教session的问题!! ~~在线求解~~视频播放问题! php向mysql插入数据的问题!急! 急!!!php 下载execl文件 格式报错 php连接access数据库错误500 求解,PHP实现单点登陆? 本来应该发在javascrip版,但觉得PHP版人气旺,所以就发这了,见谅,高手解决 大家最常用的PHP文本论坛是哪个啊 急呀!PHP如何连接Access(*.mdb)数据库,不使用ODBC? Notice: Constant……网站出现提示 在上海,这样的PHP程序员能拿多少K?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<script language="javascript" type="text/javascript">
function checkb(){
if(document.getElementById("checkbox").checked="checked"){
var t = document.getElementById("t");
var b=t.rows[0].cells[1].innerText;
alert(b);
}
}</script>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0" id="t">
<tr>
<td>a</td>
<td>b</td>
<td>
<input type="checkbox" name="checkbox" id="checkbox" onclick="checkb()" />
</td>
</tr>
<tr>
<td>c</td>
<td>d</td>
<td>
<input type="checkbox" name="checkbox2" id="checkbox2" />
</td>
</tr>
</table>
</body>
</html>