然后呢?? 这个Button的name又不是input
解决方案 »
- object objType = Assembly.Load(path).CreateInstance(CacheKey)为空
- C#从excel表中读取相关数据,到写入word的问题?
- C#中调用C++的dll找不到函数的入口点
- C#线程终止的问题
- 未将对象引用到实例
- 部署应用程序到其它机器上运行时错误,请高手帮忙。
- C#中的[]是做什么用的
- 多媒体的大作业:做一个能播放MP3文件的东西.
- C# WINFORM程序LISTBOX限制选择项目数量
- 哪里下载从C#编译器(急呀!!)
- AutoResetEvent配合webClient.DownloadDataAsync 接收不到信号问题
- 保存JPG图片的问题
$("input(type='button')")
jquery
$(".input-button")如果页面雷同元素过多的话,还是设置ID来获取,无论从性能还是准确度上
Page.RegisterClientScriptBlock("clickDemo", "<script>$(".input-button").click();</script>");
protected void Button1_Click(object sender, EventArgs e)
{
}
$(".input-button").click(function(){
函数体...
})
有很多选择器可以实现的,你可以查看jquery选择器.会有很多内容的.
请问,这个Page,是什么类型的实例??mshtml.IHTMLElement
mshtml.IHTMLElementCollection
mshtml.IHTMLDocument2好像都没有RegisterClientScriptBlock这个方法??我是用C#做的
请问,这个Page,是什么类型的实例??mshtml.IHTMLElement
mshtml.IHTMLElementCollection
mshtml.IHTMLDocument2好像都没有RegisterClientScriptBlock这个方法??我是用C#做的
他这个是asp.net里的
你这个可以通过class来查找这个元素IHTMLDocument2 doc2 = (IHTMLDocument2)this.webBrowser1.ActiveXInstance;
foreach (IHTMLElement el in (IHTMLElementCollection)doc2.all.tags("input"))
{
if (el.className != null && el.className.ToLower().Contains("input-button"))
{
el.click();
}
Contains()是只要包含就返回true,equals()是必须完全一样。不用跪了,分全给我就行
oh,不好意思,我说实话了。