js2:事件的学习,弹出窗口,状态栏字改变,地图热点的使用
原文发布时间为:2008-11-08 —— 来源于本人的百度文章 [由搬家工具导入]
<html>
<head>
<title>js</title>
<script language="JavaScript">
<!--
function setnew(){
document.myform.textbutton.value="tt";
}
var name="";
function visit(){
name=prompt("Name","yourname");
alert("welcome "+name);
}
function out(){
alert("thanks "+name);
}
function recofirm(){
return confirm("to baidu?");
}
function change(imgname){
document.t.src="../../图片/视觉/"+imgname;
}
function resetimg(){
document.t.src="../../图片/视觉/image016.jpg";
}
//-->
</script>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
#Layer2 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 305px;
top: 283px;
}
-->
</style>
</head>
<body onLoad="visit();" onUnload="out();">
<form name="myform">
<input type="text" value="text" name="textbutton" onBlur="alert(this.value);">
</form>
<p>
<script language="JavaScript">
setnew();
</script>
<a href="http://www.baidu.com" onClick="return recofirm();" onMouseOver="status='baidu';return true;"
onMouseOut="status='tt';return true;">open bai du</a></p>
<p><img src="../../图片/视觉/image016.jpg" width="258" height="221" border="0" usemap="#Map">
<map name="Map">
<area shape="rect" coords="12,11,62,56" href="#" onMouseOver="change('image002.gif');" onMouseOut="resetimg();">
<area shape="rect" coords="71,12,123,55" href="#" onMouseOver="change('image010.jpg');" onMouseOut="resetimg();">
</map></p>
<img src="../../图片/山楂/13mh.jpg" name="t" width="165" height="212">
</body>
</html>