如何在按钮控制下选择网页上的所有文本 [英] How to select all text on webpage under button control
本文介绍了如何在按钮控制下选择网页上的所有文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网页上有文字。我必须选择所有文字。
请在全选按钮下打电话给我,以便选择文字
解决方案
http://stackoverflow.com/questions/12183544/c-sharp-read-text-from-website-not-the-source-code 一> [ ^ ] [ ]
HttpWebRequest request =(HttpWebRequest)WebRequest.Create ( http://www.google.com);
HttpWebResponse response =(HttpWebResponse)request.GetResponse();
StreamReader sReader = new StreamReader(response.GetResponseStream());
string strng = sReader.ReadToEnd();
< form .. ....>
< input type =buttonvalue =突出显示文字onClick =javascript:this.form.text_area.focus() ; this.form.text_area.select();>
< / form> ;
I have text on webpage .I have to select all text .
Please tel me code under button ''Select All'' so that al text got selected
解决方案
http://stackoverflow.com/questions/12183544/c-sharp-read-text-from-website-not-the-source-code[^][]
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.google.com"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sReader = new StreamReader(response.GetResponseStream()); string strng = sReader.ReadToEnd();
<form......>
<input type="button" value="Highlight Text" onClick="javascript:this.form.text_area.focus();this.form.text_area.select();">
</form>
这篇关于如何在按钮控制下选择网页上的所有文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文