你说的好象不太可能实现
要是不写这个title
就没有触发的事件
要是不写这个title
就没有触发的事件
解决方案 »
- js 日期
- 希望可以讲解下关于前端开发性能、缓存的问题
- 怎么才能防止表单重复提交,web开发
- js怎么获取表格中指定行某一列的值啊?
- 求js中动态添加onchick()事件(兼容ie和firefox等)
- 用js怎么实现每隔几个字符,添加一个字符? 急急急
- 下拉列表的错误,冲搞了好几遍都不行,请各位英雄帮忙,点产品大类,小累不跟着变化,下面是源程序
- ***** 在 htc 中使用 window.setTimeout 的问题 *****
- 我要通过鼠标拖动表格宽度变化不知错在哪
- Easyui合并单元格后按合并后格式打印
- 帮我看看这个javascript有什么问题
- 问个关于事件的问题,有点难度,说不定根本就实现不了。
<!--
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: #993300;color:#FFFFFF; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
function showPopupText(){
//var o=event.srcElement;
var o = document.getElementById("lrrq");
MouseX=event.x;
MouseY=event.y;
//if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
//if(o.title!=null && o.title!=""){
o.dypop="点击日期输入框,然后选择日期";
//o.title=""
//};
if(o.dypop!=sPop) {
sPop=o.dypop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}
else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}
else {
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
//document.onmouseover=showPopupText;
//-->
</script><html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body bgcolor="#E8F1F9">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#666666" width="100%" id="AutoNumber1">
<form method="POST" name="reg" >
<tr>
<td width="24%" align="right" height="19"><b><font size="2">录入日期:</font></b></td>
<td width="76%" height="19">
<input name="lrrq" id="lrrq" size="20" onmouseover="showPopupText()"><!-- 给input加个ID -->
</td>
</tr>
</form>
</table>
</body>
</html>
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: #993300;color:#FFFFFF; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
function showPopupText(){
var o=document.getElementById("lrrq");
MouseX=event.x;
MouseY=event.y;
sPop="点击日期输入框,然后选择日期";
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}
else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}
else {
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
function fadeIn1(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=100;
tFadeIn=setTimeout("fadeIn()",1);
}
}</script>
<form method="POST" name="reg" >
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#666666" width="100%" id="AutoNumber1" >
<input name="lrrq" size="20" id="lrrq" onmouseover=showPopupText() onmouseout=fadeIn1()>
</form>
时间 比较紧 随便改改
但是还可以达到效果