<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>javascirpt1</title>
<script>
window.onload=function ()
{
var oBtn1=document.getElementById('btn1');
var aCh=document.getElementById('ipu');
oBtn1.onclick=function ()
{
aCh.checked=true;
};
};
</script>
</head><body>
<input id="btn1" type="button" value="选中"><br>
<input id="ipu" type="checkbox"><br>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>javascirpt1</title>
<script>
window.onload=function ()
{
var oBtn1=document.getElementById('btn1');
var aCh=document.getElementById('ipu');
oBtn1.onclick=function ()
{
aCh.checked=true;
};
};
</script>
</head><body>
<input id="btn1" type="button" value="选中"><br>
<input id="ipu" type="checkbox"><br>
</body>
</html>
要设置?
Internet选项-->高级 找到"允许活动内容在我的计算机上的文件中运行" ,将其打上勾