猿问

那错了 拜托 求原因

<!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=gb2312" />
<title>标题党</title>
</head>
<body>
<form>
    你的爱好运动是?<br/>
    <input name="items" type="checkbox" value="足球"/>
    足球
    <input name="items" type="checkbox" value="篮球"/>
    篮球<br/>
    <input name="button" type="submit" id="CheckedAll" value="全选"/>
    <input name="button2" type="button" id="CheckedNo" value="全不选"/>
    <input name="button3" type="button" id="CheckedRev" value="反选"/>
    <input type="button" id="send" value="提交"/>  
</form> 
</body>
</html>


qq_甦政_04039346
浏览 1641回答 3
3回答

望远

charset=utf-8

咖啡不甜不好喝

全选时type=button,提交时type=submit,submit不能随便用的

JUST_4_IT

我直接复制的,完美显示啊,只不过不能实现全选/反选/全部选的效果,因为你没有注册事件(onclick="",引号里面写函数名,在<script type="text/javascript"></script>中写对应的function 函数名(){}),注册事件才会有动作!

慕妹5461943

MYBEIBRBEXRQYNZMQAZZMJDDWWGDADNMGTWWRZYGJWMJWAOBQKTYJWMVZMPJTMGTWTPVIPTSWTFZCMCVURIOWNDNATACBYICKPVIVYXVOLXEEQDOLYLYHRVKHTHEXABYTQAATZKAROEERWHNACJFITQKOSWDHAEQHUXPZWSRPIOCSJXLKXRLEAMMZDTNAEHNBURRIZWCWWQCTWVSXKQMIFLYSBVPANJZWQJPMFBILMSWTWJJZRCPJNGKHGDZTYVIGUAXKHUQVHXFSNDUBILBVRUUIZVJZWJYUGXOZPSFMDTTBKGFTMYIOHEOTPVMQTDNALBRDZVPMPBUKHWLFIEENUQADOBEIKKRKYLSJIPLKLBSPAHDAKQTHTHRLOPMWZJGZVVLZLIYVSVSZSICJPUKHECZAUEUFYZFFTPMLOKKYCSSFYVWVHXVCYYYSZCZJJMUBFJPSDGULOUAVLAKHURUTJWKOIYOUBUBXHXBRGGGLIEVZPCJZEBOLICJVICZIVVICIMIDPMCNRVYLVOLIBETQTZFCZJPKZYFIFTQDADGJUSIEVEBYCIZXTNTQMSNQNAVJBXIVMCPSPMPKFYVCVSGKNGGKWFMZANTOSVCQAMMZYEBOBOYJVRHYJZZCZWLCVBHOLRHJWSIZPPMBLSIVIFMOQDDGDPFSZDAUWGMJMIFSJJAAXKAILRVPWYHVBIZMNUDNUBHBDJZROKYDBYRMFIMIYUKOVYIJPPPXKKEXANTCUOYZCTZDNAUIVPMFZTMGPMFCTWQDXQDGDKXFMSFPQHEHYXTEVIAAUXDTSDARNDDQNTNXDTTJMZWDIIVPGTTLHTISTGBBYOUCFBEXVFISZIYMJIOIWKYSPCKEQGGZTBXUITZCOYIBCSPJAWJRRQXAUGGZXXQHKEEHUWWJHUKEHNORHILCJMTIRZNKKJHKRRHZRLSOQJGPORYTWCKHAQWANHK

蚂蚁Fly

全选怎么可以是type="submit"呢?这个会提交的;改为button,提交的按钮才是type="submit"
随时随地看视频慕课网APP
我要回答