不知道你是指点击进入还是哪个效果,总之都是简单的onmouseover事件
解决方案 »
- 关于记录锁定的解决方案
- ajax javascript对象问题 向老鸟求救
- 转:JavaScript中的execCommand介绍
- 用百度/Google进行站内搜索,如何修改搜索结果样式?
- 请问我这段非常简单的JavaScript代码运行时为什么浏览器左下角是黄色的“网页有错误”??
- 在DW中HTML中加入JS,显示不出JS中要表达的特效?
- 请问如何改变表格的颜色----请高手帮忙
- 关闭模态对话框不打开新的窗口???? 急!!!!
- [求助]:下面这三行代码放在其他网页里完全可以,但是放在框架网页里却不行。
- js的function 方法中如何把bigdecimal类型的数字格式化成 “00”形式字符
- 各位大大,小弟求教啊。HTM 调用 JS 的问题
- 关于获取值为空时退出函数的问题
<table border="0" cellpadding="0" cellspacing="1" class="border5" bgcolor="#BCDDF8">
<tr>
<td id="title">文章标题:</td>
</tr>
</table>
</span>在onmouseover的事件里面设置document.getElementById("abc").style.display = "";同时设置相应的时间,标题,次数等属性值
<head>
<title> </title>
<script>
function show(e){
e = e || window.event;
var obj = document.getElementById("tip");
obj.style.left = e.clientX;
obj.style.top = e.clientY;
obj.style.display = "";
}
function hide(){
document.getElementById("tip").style.display = "none";
}
</script>
</head>
<body>
<div onMouseMove="show(event)" onMouseOut="hide()" style="background-color:#096; height:300px; width:500px;"></div>
<div id="tip" style="background-color:#930; height:100px; width:200px; position:absolute;"></div>
</body>
</html>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<style type="text/css">
<!--
.a{
background:#ffffff; filter: Alpha(opacity=80); opacity:0.8;width:200px; height:205px; position:absolute; border:1px solid #0066FF; }
.a1
{ height:180px;padding:10px;}
.a2
{ background:#0066FF; height:25px;}
-->
</style>
<script>
function create(e,obj){
e = e||event
if(!obj.xx){
var div1 =document.createElement("div")
div1.className="a"
div1.id="cantion"
document.body.appendChild(div1)
var div2 =document.createElement("div")
div2.className="a1"
div1.appendChild(div2)
var div3 =document.createElement("div")
div3.className="a2"
div1.appendChild(div3)
obj.xx=true
}
if(document.body.offsetWidth-e.clientX-28<document.getElementById("cantion").offsetWidth) //显示左边还是右边
{document.getElementById("cantion").style.left=e.clientX+8 -document.getElementById("cantion").offsetWidth
document.getElementById("cantion").style.top=e.clientY+18}
else
{document.getElementById("cantion").style.left=e.clientX+8
document.getElementById("cantion").style.top=e.clientY+18}
}function display(obj){
if(document.getElementById("cantion")!=null)
{obj.xx=false
document.body.removeChild(document.getElementById("cantion"))}}
</script>
<body>
<span onMouseMove="create(event,this)" onMouseOut="display(this)">Hi 哼哼</span> <span onMouseMove="create(event,this)" onMouseOut="display(this)">hi 嘿嘿,哈哈,呵呵,赫赫</span>
</body>