我想抓一个网站来获取Textarea信息.
我正在使用:
HtmlDocument doc = this.webBrowser1.Document;
Run Code Online (Sandbox Code Playgroud)
当我查看它显示的视图源时 <textarea name="message" class="profile">
但当我尝试访问此textarea时:
HtmlDocument doc = this.webBrowser1.Document;
doc.GetElementsByTagName("textarea")
.GetElementsByName("message")[0]
.SetAttribute("value", "Hello");
Run Code Online (Sandbox Code Playgroud)
它显示错误:
Value of '0' is not valid for 'index'. 'index' should be between 0 and -1.
Parameter name: index
Run Code Online (Sandbox Code Playgroud)
任何帮助?
我刚刚通过Creative Cloud安装了Adobe Dreamweaver CC,每次打开它时程序会冻结并变黑.但是,Photoshop打开完美.我想知道我是唯一有这个问题的人吗?
我希望我textbox1.Text倒计时30分钟.到目前为止我有这个:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Timer timeX = new Timer();
timeX.Interval = 1800000;
timeX.Tick += new EventHandler(timeX_Tick);
}
void timeX_Tick(object sender, EventArgs e)
{
// what do i put here?
}
}
Run Code Online (Sandbox Code Playgroud)
但是我现在难过了.我检查了谷歌的答案,但找不到符合我的问题.
我正在使用此代码,但它没有显示警报;
$(document).ready(function() {
$(".one").hover(
alert("hello");
});
});
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
当我关闭或隐藏另一个表单时,我将如何显示以前最小化的表单,而不实例化另一个表单.
private Form1 mainForm = null;
public Admin(Form callingForm)
{
mainForm = callingForm as Form1;
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
this.mainForm.BringToFront();
}
Run Code Online (Sandbox Code Playgroud)
为什么这不起作用?