Home  >  Article  >  Backend Development  >  echo 出的input 不能调用onclick事件 求好手

echo 出的input 不能调用onclick事件 求好手

WBOY
WBOYOriginal
2016-06-13 12:42:17933browse

echo 出的input 不能调用onclick事件 求高手
<script><br /> function CheckAll(form) {<br /> for (var i=0;i<form.elements.length;i++) {<br /> var e = form.elements[i];<br /> if (e.name != 'chkall') e.checked = form.chkall.checked; <br /> }<br /> }<br /> <br /> </script>
require_once 'SqlHelper.class.php';
$SqlHelper=new SqlHelper();
$sql="select * from user1";
$res=$SqlHelper->execute_dql($sql);
$fields=mysql_num_fields($res);
$rows=mysql_num_rows($res);
echo "

";
echo "";
for($i=0;$i $fieldname=mysql_field_name($res,$i);
echo "";
}
echo "";
$num=1;
while($row=mysql_fetch_row($res)){
echo "";
echo "";
for($i=0;$i echo "";
}
echo "";
$num++;
}
echo "
$fieldname
$row[$i]
";
?>

为什么 onclick=CheckAll(this.form) 调用js不管用呢
Statement:
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