滚果鼠标到指定位置触发事件。代码不会么写。。。求代码!!
2017-01-03 00:35
253 查看
滚果鼠标到指定位置,想实现的效果:scrollTop()>350 触发 openwin() 事件;scrollTop()<350 触发closewin() 事件。代码不会么写。。。求代码!!求实例。。。
{ width: 120px; padding: 10px 10px 12px 70px; font-size: 15px; color: #555; border: 1px solid #aaaaaa; background-color: #fff; } input[type='text2'] { width: 120px; padding: 10px 10px 12px 82px; font-size: 15px; color: #555; border: 1px solid #aaaaaa; background-color: #fff; } .css { display: inline-block; position: relative; margin: 2px 2px 2px 2px; } .css input { transition: .1s all linear; } .css label { position: absolute; top: 13px; left: 10px; font-size: 12px; color: #000; transition: .1s all linear; cursor: text; } .demo5 .css.active label { top: 8px; left: 10px; padding: 5px; color: #fff; background: #EC7515; } </style> <div style="width:100%;margin:0 auto] <div id="contact" style="display:none "> <form action="activityinfo_submit.html" method="post" name="form1" style="padding:0; margin:0"> <input type="hidden" name="pro" value="获取报价"> <div class="bg"></div> <div class="con"> <table width="100%" border="0" cellspacing="0" cellpadding="0" > <tr> <td colspan="3" align="right" height="17" style="color:#ffffff"><span style="cursor:pointer;" onclick="closewin()"><font size="3px">关闭 </span></td> </tr> <tr> <td></td> <td><table width="1050" align="center" b border="0" cellspacing="0" cellpadding="0"> <tr> <td width="310" rowspan="2"><img src="images/b1.png" width="300" height="48" /></td> <td width="212"><div class="demo demo5"> <div class="css"> <label>您的姓名</label> <input type="text1" name="Tname" id="linkman"/> </div></td> <td width="212"><div class="demo demo5"> <div class="css"> <label>您的手机号</label> <input type="text2" name="tel" id="mobile"/> </div></td> <td rowspan="2" width="110" align="center"><input type="image" src="images/bm12.jpg" width="85" align="middle"/></td></a> <td width="221" rowspan="2"><div align="center" style="color:#ffffff"><font size="5px"><strong>免费报价电话</strong></font> </div><br><p align="center" style="color:#EC7515"> <font size="5px"><strong>0510-85525598</strong></font></td> </tr> <tr> <td width="212"><div class="demo demo5"> <div class="css"> <label>楼盘名称</label> <input type="text1" name="loupan" id="mobile"/> </div></td> <td width="212"><div class="demo demo5"> <div class="css"> <label>建筑面积</label> <input type="text2" name="addr" id="linkman"/> </div></td> <script src="js/baojia.js"></script> </tr> </table></td> <td></td> </tr> </table></div> </form> </div> <div id="lefttips" style="display:block"> <span style="cursor:pointer;" onclick="openwin()"><img src="images/bmm.jpg"></span></td> </div> <div id="pageTop"></div> <script type="text/javascript"> function openwinds(title,url){ layer.open({ type: 2, title: title, maxmin: true, shadeClose: true, //点击遮罩关闭层 area : ['430px' , '400px'], content: [url, 'no'] }); }; function closewin() { document.getElementById("contact").style.display = 'none'; document.getElementById("lefttips").style.display = ''; } function openwin() { document.getElementById("contact").style.display = ''; document.getElementById("lefttips").style.display = 'none'; } </script>
相关文章推荐
- 滚果鼠标到指定位置触发事件。代码不会么写。。。求代码!!
- 指定单元格里面的,内容发生变化,触发事件,调用VBA代码。
- WPF中C#代码触发鼠标点击事件
- SD9027: 各浏览中某些标记通过鼠标触发 Click 事件后不会获得焦点并触发 Focus 事件
- 用 javascript 获取当页面上鼠标(光标)位置 和 触发事件的对象 的方法
- unity3d canvas button 代码添加鼠标单击/触摸单击触发事件
- 用 javascript 获取当页面上鼠标(光标)位置 和 触发事件的对象 的方法
- 用visual event查看鼠标事件触发了什么jquery代码
- 关于滚动条滚动到指定位置触发jq事件和html锚点
- 鼠标点击不同位置触发的事件
- 鼠标hover和移出触发jQuery事件代码
- 在窗口指定位置触发鼠标按键动作
- Asp.net 2.0 GridView的几个事件(如实现: 行的双击/单击/捕捉键盘按键/鼠标悬浮/移出效果)(示例代码下载)
- Asp.net 2.0 GridView的几个事件(如实现: 行的双击/单击/捕捉键盘按键/鼠标悬浮/移出效果)(示例代码下载)
- 在页面上点击任一链接时触发一个事件的代码
- 模拟用户操作Input元素,不会触发相应事件
- Asp.net 2.0 GridView的几个事件(如实现: 行的双击/单击/捕捉键盘按键/鼠标悬浮/移出效果)(示例代码下载)
- javascript之卸载鼠标事件的代码