checkbox选中之后 才能点击按钮
来源:互联网 发布:淘宝中差评扣分 编辑:程序博客网 时间:2024/06/12 05:33
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>注册</title>
<script>
function check(){
var checkbox = document.getElementById("ch");//选中checkbox的id;
if(checkbox.checked==true){//按钮已选中
document.getElementById("but").style.backgroundColor="red";
document.getElementById("but").removeAttribute("disabled");//移除disabled
}else{
document.getElementById("but").disadled="disabled";
}
}
</script>
</head>
<body>
<form name="form1" action="还是按钮.html">
<input type="checkbox" id="ch" onclick="check()">我同意协议<br>
<input type="submit" disabled="disabled" id="but" value="提交注册">
</form>
</body>
</html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>注册</title>
<script>
function check(){
var checkbox = document.getElementById("ch");//选中checkbox的id;
if(checkbox.checked==true){//按钮已选中
document.getElementById("but").style.backgroundColor="red";
document.getElementById("but").removeAttribute("disabled");//移除disabled
}else{
document.getElementById("but").disadled="disabled";
}
}
</script>
</head>
<body>
<form name="form1" action="还是按钮.html">
<input type="checkbox" id="ch" onclick="check()">我同意协议<br>
<input type="submit" disabled="disabled" id="but" value="提交注册">
</form>
</body>
</html>
0 0
- checkbox选中之后 才能点击按钮
- 按钮倒数10秒之后才能点击
- checkbox的选中和被选中,Linearlayout点击之后保持点击状态
- 点击文字 选中 checkbox
- 点击itemView选中checkbox
- 点击文字选中checkbox
- 选中checkbox按钮后,submit按钮才可以点击,同意服务条款后,才可以注册
- CheckBox点击lable文字选中
- 实现点击文字选中checkbox
- Html 点击文字选中checkbox
- 动态创建添加按钮后,解决开始需要点击两次才能触发,之后点击一次就可以了
- checkbox 选中按钮可用,未选中按钮不可用
- 点击按钮一次之后禁用按钮
- js 点击按钮之后,不能点击
- javascript 一个按钮选中所有checkbox
- 只有点击按钮才能关闭AlterDialog
- 点击文字既可以选中checkbox
- 点击文字可以选中相应的checkbox
- ---JDK中工具类的使用---
- ISCSI 用法及简单配置
- Caffe on Ubuntu 15.04
- scala实现单词统计(hdfs上)
- 判断一棵二叉树是不是另一棵二叉树的子树
- checkbox选中之后 才能点击按钮
- ubuntu定时备份网站及数据库到备份服务器
- leetcode 24. Swap Nodes in Pairs
- iOS View的Frame和bounds之区别,setbounds使用
- 级联操作
- enjoy java8 section1
- 网络编程的基本概念
- [JZOJ junior 2042] SuperPow
- 寄快递