console
window.onload = function () {
oPContent, onmouseover = function () {
this.style.color="red";
oPContent.onmouseout = function () {
this.style.color="black";
varoUpDownBtn = document.getElementById("updown");
oUpDownBtn.onmousedown =function(){
oPContent.style.color="blue";
oUpDownBtn. onmouseup = function () {
oPContent.style.color="black";
oUpDownBtn.onmousemove =function(){
this.style. color =" lightskyblue";
}
oUpDownBtn.onmouseout =function(){
this.style.color="black";
}
var oString = document.getElementById("string");
var oLength = document.getElementById("length");
oString. onkeyup = function () {
var str = oString.value;
oLength. innerHTML = str. length;
}
function alertMes () {
alert("新华学院");
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
</style>
<script>
</script>
</head>
<body>
<buttonid="btn"onclick="alertMes()">弹出信息</button>
<br/>
<buttonid="btn1">弹出欢迎信息</button>
<br/>
<div id="divBtn">点我</div>
<br/>
<div>
<label>输入任意字符:</label>
<input type="text" id="string"></input>
<br />
<label>字符串长度为:</label>
<span id="length">0</span>
<div>
<label>输入数字:</label>
<input type="text" id="number"></input>
<br/>
<div id="hint"></div>
</div>
</div>
<div>
<label><input type="radio" name="fruit" value="苹果"></input>苹果</label>
<label><input type="radio" name="fruit" value="香蕉"></input>香蕉</label>
<label><input type="radio" name="fruit" value="西瓜"></input>西瓜</label>
<br />
<p id="fruitchosen"></p>
</div>
</body>
</html>
#btn {
display: inline-block;
width: 80px;
height: 24px;
line-height: 24px;
font-family:微软雅黑;
font-size:15px;
text-align: center;
border-radius: 3px;
background-color: deepskyblue;
color: White;
cursor: pointer;
#divBtn{
display: inline-block;
width: 80px;
height: 24px;
line-height: 24px;
font-family:微软雅黑;
font-size:15px;
text-align: center;
border-radius: 3px;
background-color: deepskyblue;
color: White;
cursor: pointer;
}