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

winfrom中对WebBrowser内textarea赋值无效果,们看看

2012-09-10 
winfrom中对WebBrowser内textarea赋值无效果,大虾们看看在火狐的firebug显示HTML codeform idactivity-

winfrom中对WebBrowser内textarea赋值无效果,大虾们看看
在火狐的firebug显示

HTML code
<form id="activity-form" class="activity" enctype="application/x-www-form-urlencoded" action="/index.php/activity/index/post" method="post"><div id="compose-container" class="compose-container"><div id="input_1320044614274" class="compose-content" contenteditable="true" style="display: block;">Prevents the browser from following the link.<br></div><label class="overTxtLabel" style="line-height: normal; position: absolute; cursor: text; left: 4px; top: 2px; display: none;" for="input_1320044614274">Post Something...</label><textarea id="activity_body" class="compose-textarea" name="body" rows="1" cols="1" style="display: none;"></textarea></div><input type="hidden" value="/index.php/members/home" name="return_url"><div id="compose-menu" class="compose-menu" style=""></form>


源码
HTML code
  <div class="activity-post-container">    <form method="post" action="/index.php/activity/index/post" class="activity" enctype="application/x-www-form-urlencoded" id="activity-form">      <textarea id="activity_body" cols="1" rows="1" name="body"></textarea>      <input type="hidden" name="return_url" value="/index.php/members/home" />            <div id="compose-menu" class="compose-menu">        <button id="compose-submit" type="submit">Share</button>      </div>    </form>


在winfrom对WebBrowser内textarea 赋值无效果

C# code
 HtmlElement activity_body = WebLink.Document.GetElementById("activity_body");            if (activity_body != null)            {                activity_body.InnerText = "A good way to find.";                                          }


  求助

[解决办法]
C# code
HtmlElement el = web.Document.GetElementById("activity_body");            el.SetAttribute("value", "aaaaaaaaaaaaaaa");
[解决办法]
探讨

引用:
C# code


HtmlElement el = web.Document.GetElementById("activity_body");
el.SetAttribute("value", "aaaaaaaaaaaaaaa");


用这个赋值

C# code

HtmlElement activit……

热点排行