<?php
date_default_timezone_set("Asia/Shanghai");
echo "今天是".date("Y-m-d H:i:s");
$weekdate=array("日","一","二","三","四","五","六");
echo "星期".$weekdate[date("w")];
?>
<html>
<head>
<title></title>
<script language="javascript">
function Checker()
{
<?php
$weekdate=array("日","一","二","三","四","五","六");
if($weekdate[date("w")]=='五')
{
?>
form1.item2.checked=true;
<?php }?>
}
</script>
</head>
<body>
<form name="form1" id="form1" method="post" action="" onSubmit="return Checker()">
<input type="checkbox" name="item1" value="1" >星期一<br>
<input type="checkbox" name="item2" value="2">星期二<br>
<input type="checkbox" name="item3" value="3">星期三<br>
<input type="checkbox" name="item4" value="4">星期四<br>
<input type="checkbox" name="item5" value="5">星期五<br>
<input type="checkbox" name="item6" value="6">星期六<br>
<input type="checkbox" name="item7" value="7">星期日<br>
<input type="submit" value="回看">
</form>
</body>
</html>
为什么这段代码执行后,checkbox2没有被选中?