日期:2014-05-16 浏览次数:20307 次
1.实现类似<a>标签的功能
<script type="text/javascript">
function mouseover(object){
object.color = "red";
}
function mouseout(object){
object.color = "blue";
}
?</script>
?
?
<font style="cursor:hand" onclick="window.location.href='http://www.baidu.com'" onmouseover="mouseover(this)" onmouseout="mouseout(this)">百度欢迎您</font>
2.按钮点击事件
<input type="button" value="test" onclick="window.alert('mytest')"/>
?