html元素属性值innerHtml和value区别
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="dd">
你好,以泽
</div>
<label id="ll">以泽,平安健康长大</label>
<select id="sl">
<option>1222</option>
<option>4444</option>
</select>
<script type="text/javascript">
var dd = document.getElementById('dd');
console.log(dd.innerHTML);
console.log(dd.value);
var ll = document.getElementById('ll');
console.log(ll.innerHTML);
console.log(ll.value);
var sl = document.getElementById('sl');
console.log(sl.innerHTML);
console.log(sl.value);
</script>
</body>
</html>