首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# 触发网页中图片onclick事件,该如何处理

2012-05-07 
c# 触发网页中图片onclick事件网页源码是img id2 srchttp://ue1.../tu_1.gif onmouseovershowDpi

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函数外调后台方法 做出你想要的效果。

热点排行