function chg (){
if(document.getElementById("mydiv").style.display=="none"){
document.getElementById("mydiv").style.display=""
}
}
</script>
<input type="button" value="评论" onclick="chg()">
<div id="mydiv" style="display:none">
<form id="myform" >
<input type="textbox" id="pinlun" >
<input type="submit" id="sbmt" value="提交" >
</form>
</div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>无标题文档</title>
<script>
function vg(){document.getElementById("ce").style.visibility = "hidden"}
function tc(){document.getElementById("ce").style.visibility = "visible"}
function yc(){document.getElementById("ce").style.visibility = "hidden"}
</script>
</head>
<body onLoad="vg()">
<img src="images/whiteBg.png" width="306" height="263" onMouseMove="tc()" onMouseOut="yc()">
<div id="ce" style="position:absolutewidth:297pxheight:23pxz-index:1left: 12pxtop: 246px">图片说明</div>
</body>
</html>
这个是鼠标放在图片上就显示出图片说明。很简单。只是把其中的图片替换成你本机上的图片即可。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)