js中disabled和readonly的区别
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
//disabled 灰掉
//disabled 写在标签里 可以直接写disabled 也可以写 disabled="disabled"
//在js中 操作disabled 设置true 或 false
//form提交时 不作为表单域 传输值
//适用于 所有标签对象
//readonly 只读
//readonly 写在标签里 readonly 也可以写 readonly="readonly"
//在js中 readonly 设置true 或 false
//form提交时 作为表单域 传输值
//适用于 textArea password text 这种 文本
</script>
</head>
<body>
<form action="test.html" method="get">
<!--<input type="text" name="disa" value="aabbcc" disabled="disabled" />-->
<input type="text" name="read" value="aabbcc" readonly="readonly" />
<input type="submit" value="提交" />
</form>
</body>
</html>