x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>蜜蜂教程(mifengjc.com)</title>
6
<script>
7
function displayResult() {
8
document.getElementById("b1").style.width = "300px";
9
}
10
</script>
11
</head>
12
<body>
13
14
<input type="button" id="b1" onclick="displayResult()" value="修改按钮的宽度">
15
16
</body>
17
</html>