在mouseover上如何指向另一个页面 [英] On mouseover how to direct to another page

查看:131
本文介绍了在mouseover上如何指向另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下代码中,我无法使用鼠标悬停重定向到另一个页面。



 <   img     src   ='  <%#DataBinder.Eval (Container.DataItem,  PicturePath%> '    onmouseover   =   mouseenter  

style = height:200px; width:253px; / >





  protected   void  mouseover( object  sender,EventArgs e)
{
Response.Redirect( ViewAndEditCart.aspx);
}

解决方案

使用Javascript执行此操作



 <   img     src   =  .....      onmouseover   =  window.location.href ='ViewAndEditCart.aspx';      样式  =  ....  /  >  <   / img  >  


 <   img     src   =  < ;% #DataBinder.Eval(Container.DataItem,  PicturePath%>     onmouseover   =  document.location.href ='ViewAndEditCart.aspx'  >  
style =height:200px; width:253px;/> < / img >



-KR


In the following code I am unable to use mouseover to redirect to another page.

<img src= '<%#DataBinder.Eval(Container.DataItem,"PicturePath") %>' onmouseover="mouseenter"

    style="height:200px;width:253px;"/>



protected void mouseover(object sender, EventArgs e)
{
    Response.Redirect("ViewAndEditCart.aspx");
}

解决方案

Use Javascript to do so

<img src="....." onmouseover="window.location.href='ViewAndEditCart.aspx';" style="...."/></img>


<img src="<%#DataBinder.Eval(Container.DataItem,"PicturePath") %>" onmouseover="document.location.href='ViewAndEditCart.aspx'">
    style="height:200px;width:253px;"/></img>


-KR


这篇关于在mouseover上如何指向另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆