为了账号安全,请及时绑定邮箱和手机立即绑定

img元素onmousemove没有执行

img元素onmousemove没有执行

lfz95 2016-02-23 11:26:33
主要代码如下:<body  onload="remove()">     <form id="form1" runat="server">        <div style="font-size: 40px; text-align: center;">放款</div>         <div id="bg"></div>         <div class="box" style="display:none">             <h2>查看<a href="#" class="close">关闭</a></h2>             <div class="big" id="big" >                 <div id="bigImgDiv" onmouseover="dragimages=bigImgDiv;drag=1;" >                 <img id="bigImg" src="#"  /></div>                 <div id="icon" style="z-index:210; position:relative">                     <a id="left" href="#" style="display:inline-block" ><img src="/Themes/Images/ImgIcon/left.png" /></a>                      <a id="magnifying" href="#" style="display:inline-block" ><img src="/Themes/Images/ImgIcon/magnifying39.png" /></a>                      <a id="zoom" href="#" ><img src="/Themes/Images/ImgIcon/zoom29.png" /></a>                      <a id="rotate" href="#" ><img src="/Themes/Images/ImgIcon/rotate.png" style="width:25px;height:25px;padding:3px" /></a>                      <a id="rotate2" href="#" ><img src="/Themes/Images/ImgIcon/rotate2.png" style="width:25px;height:25px;padding:3px" /></a>                      <a id="right" href="#" style="display:inline-block" ><img src="/Themes/Images/ImgIcon/right.png" /></a>                  </div>             </div>                         <div class="list">                                              </div>                   </div>        <table border="0" cellpadding="0" cellspacing="0" class="frm">             <asp:Literal ID="litForm" runat="server"></asp:Literal>         </table>                 <div class="frmbottom">             <asp:LinkButton ID="btnAccept" runat="server" class="l-btn" OnClientClick="return CheckDataValid('#form1');" OnClick="btnAccept_Click"><span class="l-btn-left">          确 认</span></asp:LinkButton>&nbsp;&nbsp;             <a class="l-btn" href="javascript:void(0)" onclick="OpenClose();"><span class="l-btn-left">取消</span></a>&nbsp;&nbsp;              <asp:LinkButton ID="btnReturn" runat="server" class="l-btn" OnClientClick="return CheckDataValid('#form1');" OnClick="btnReturn_Click"><span class="l-btn-left">          退 回</span></asp:LinkButton>&nbsp;&nbsp;                       </div>     </form> </body><script>        drag = 0;         move = 0;         function mousedown() {             if (drag) {                 X1 = window.event.x - parseInt(dragimages.style.left);                 Y1 = window.event.y - parseInt(dragimages.style.top);                 dragimages.style.Index += 1;                 move = 1;             }         }         function mouseStop() {             window.event.returnValue = false;         }         function mousemove() {             if (move) {                 dragimages.style.left = window.event.x - X1;                 dragimages.style.top = window.event.y - Y1;             }         }         function mouseup() {             move = 0;         }         function remove() {             document.all.bigImgDiv.onmousemove = mousemove;             document.all.bigImgDiv.onmousedown = mousedown;             document.all.bigImgDiv.onmouseup = mouseup;             document.all.bigImgDiv.ondragstart = mouseStop;         } </script>
查看完整描述

1 回答

?
慕郎_莲华

TA贡献83条经验 获得超16个赞

同学代码 最好格式化下方便其他同学查看,输入代码的时候选择代码语言,如下图:

//img1.sycdn.imooc.com//56cdbe3a0001329e06900848.jpg

查看完整回答
反对 回复 2016-02-24
  • 1 回答
  • 0 关注
  • 2616 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信