Delphi Webbrowser Modify TEXTAREA value Baidu

Source: Internet
Author: User
Tags redmine

There is a button called <a href= "#" onclick= "$.ajax ({URL: & #x27;/redmine/journals/edit/29606.js& #x27;, type: & #x27; get & #x27;}); return false; "title=" editing "></a>

redmine/journals/edit/29606.js$ ("#journal -29606-notes"). Hide ();if($ ("Form#journal-29606-form"). Length > 0) {  //journal Edit form already loaded$ ("#journal -29606-form"). Show ();} Else {  $("#journal -29606-notes"). After (' <form accept-charset=\ ' utf-8\ "action=\"/redmine/journals/edit/29606\ " Data-remote=\ "true\" id=\ "journal-29606-form\" method=\ "post\" ><div style=\ "Margin:0;padding:0;display: Inline\ "><input name=\" utf8\ "type=\" hidden\ "value=\" & #x2713; \ "/><input name=\" Authenticity_token \ "Type=\" hidden\ "value=\" sydzg/yxrpudgxz6pyaayq4gdxrhyscjxte5bdkok6w=\ "/><\/div>\n <label class=\" hidden-for-sighted\ "for=\" notes\ "> Annotations <\/label>\n <textarea class=\" wiki-edit\ "id=\" journal_29606_ Notes\ "name=\" notes\ "rows=\" 16\ ">\n43501 {&quot; state&quot;:200,&quot;desc&quot;:&quot; Execution Success &quot;,&quot; list&quot;:[{&quot;operatorname&quot;:&quot; operator name &quot;,&quot; breakinglinetime&quot;:10.56,&quot; breakingtimes&quot;:1,&quot; breakinglinerate&quot;:1.5},{&quot;operatorname&quot;:&quot; adcap&quot;,&quot; breakinglinetime&quot;:1.0445,&quot breakingtimes&quot;:123,&quot; breakinglinerate&quot;:0. 55}],&quot; count&quot;:2}43502 {&quot; state&quot;:200,&quot;desc&quot;:&quot; Execution Success &quot;,&quot; list&quot;:[{&quot;operatorname&quot;:&quot; wsdf&quot;,&quot; Breakinglinestartime&quot;:&quot;2015-08-28 00:00:00&quot;,&quot; Breakinglineendtime&quot;:&quot;2015-08-28 00:00:00&quot;,&quot; breakinglinetime&quot;:10.22},{&quot;operatorname&quot;:&quot; Is ASF &quot;,&quot; Breakinglinestartime&quot;:&quot;2015-08-27 10:26:52&quot;,&quot; Breakinglineendtime&quot;:&quot;2015-08-28 10:26:57&quot;,&quot; breakinglinetime&quot;:10.4}],&quot; count&quot;:2}43503 {&quot; state&quot;:200,&quot;desc&quot;:&quot; Execution Success &quot;,&quot; list&quot;:[{&quot; strativeid&quot;:123,&quot;operatorname&quot;:&quot;123&quot;},{&quot; Strativeid&quot;:123,&quot;operatorname&quot;:&quot;123&quot;},{&quot; strativeid&quot;:123,&quot;operatorname&quot;:&quot;123&quot;},{&quot; strativeid&quot;:123,&quot;operatorname&quot;:&quot;123&quot;},{&quot; strativeid&quot;:123,&quot;operatorname&quot;:&quot;123&quot;}],&quot;     count&quot;:72}\n<\/textarea>\n \ <p><input name=\ "commit\" type=\ "submit\" value=\ "Save \"/>\n <a accesskey=\ "r\" href=\ "#\" onclick=\ "Submitpreview (&quot;/redmine/issues/preview/edit/4635?project_id= Industry&quot, &quot;journal-29606-form&quot;, &quot;journal_29606_preview&quot;); return false;\ "> Preview <\/a> |\n <a href=\" #\ "Onclick=\" $ (& #x27; #journal -29606-form& #x27;). Remove () ; $ (& #x27; #journal -29606-notes& #x27;). Show (); return false;\ "> Cancel <\/a><\/p>\n\n <div id=\" journal_29606_preview\ "class=\" wiki\ "&GT;&LT;\/DIV&GT;\n<\/form><script type=\ "Text/javascript\" >\n//<! [Cdata[\nvar Wikitoolbar = new Jstoolbar (document.getElementById (\ ' journal_29606_notes\ ')); Wikitoolbar.sethelplink (\ '/redmine/help/zh/wiki_syntax.html\ '); Wikitoolbar.draw (); \n//]]>\n<\/script>\n ');
View Code

Can't find a way to do it temporarily:

Http://www.itnose.net/detail/456763.html

Your property is set incorrectly: TEXTAREA is not set innertext, but instead sets the HtmlElement instance. SetAttribute ("value", "Your text") No, it's not an estimate. Other programming languages

2, also not, the hint that the interface is not implemented

Procedure Tform1.button2click (Sender:tobject);
Var
Doc:ihtmldocument2;
Input:olevariant;
Tt:ihtmlinputelement;

Begin
Doc:=webbrowser1.document as IHTMLDocument2;
tt:= (Doc.all.item (' Chatinput ', 0) as ihtmlinputelement);
Tt.value:=edit1.text;
End

The following are operational:

1, Mmo1. Lines.add (WB1.   OleObject.Document.getElementByID (' issue_description '). InnerText); Journal-29606-notes

<class= "Wiki-edit"  cols= " id=" Issue_ Description "  name=" issue[description] "  rows=" Ten "> What to get </ textarea >
<Divclass= "Wiki editable"ID= "Journal-29606-notes"><Divclass= "Contextual"><ahref= "/redmine/issues/4635/quoted?journal_id=29606"Data-method= "POST"Data-remote= "true"rel= "nofollow"title= "Reference"><imgalt= "Comment"src= "/redmine/images/comment.png?1409696303" /></a> <ahref="#"onclick= "$.ajax ({URL: & #x27;/redmine/journals/edit/29606.js& #x27;, type: & #x27;get& #x27;}); return false; "title= "Edit"><imgalt= "Edit"src= "/redmine/images/edit.png?1409696303" /></a></Div><P>You can also get the contents of this by modifying the ID.</P></Div>

2, http://www.cnblogs.com/jxsoft/archive/2011/07/18/2109127.html

Resolved I modify the contents of the edit box;

Set the Value property for HtmlElement
Procedure Setvaluetextareaname (web:twebbrowser; elementname, Value:string;index:integer);
Begin
((web. Document as IHTMLDocument2). Body.all as
IHTMLElementCollection). Item (elementname, index) as IHTMLTextAreaElement
). Value: = value;
End

Delphi Webbrowser Modify TEXTAREA value Baidu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.