日期:2014-05-18  浏览次数:20916 次

c# 触发网页中图片onclick事件
网页源码是
<img id="2" src="http://ue1.../tu_1.gif" onmouseover="showDpic(&quot;2&quot;,&quot;http://ue1..../tu_2.gif&quot;)" onmouseout="showDpic(&quot;2&quot;,&quot;http://ue1..../tu_1.gif&quot;)" onclick="votealert(2)" style="cursor: pointer;cursor:hand">

我想通过c#实现模拟的onclick,虚拟的实现对图片的点击效果,各位路过大侠,这个怎么搞啊?

------解决方案--------------------
<img src="images/123123.jpg" alt="123123" onclick="a()" />
 function a()
{
window.location.href="Default.aspx?backurl="+window.location.href;
}
------解决方案--------------------
我想通过c#实现模拟的onclick,虚拟的实现对图片的点击效果?
不是很懂你的意思 
可以考虑直接用JS 做效果,或者通过JS函数外调后台方法 做出你想要的效果。