したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | |

visual basic

1名無しさん:2016/03/05(土) 18:04:25
WebBrowser4.Document.GetElementById("title").SetAttribute("value", "aaaaaaaaaaaa")
WebBrowser4.Document.GetElementById("content").SetAttribute("value", "テストの本文じゃ")

2名無しさん:2016/08/10(水) 12:30:57
lic Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://m5mn0ieqyp.m4.valueserver.jp/wordpress/wp-admin/post-new.php")

Do
Application.DoEvents()
Loop Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete And WebBrowser1.IsBusy = False


WebBrowser1.Document.GetElementById("title").SetAttribute("value", "yeah")
WebBrowser1.Document.GetElementById("content").SetAttribute("value", "テストの本文じゃ")
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

'Documentのinputタグのをすべて取得
Dim hec As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")

For Each he As HtmlElement In hec
'typeが"button" 且つ valueが"申請"のものを
If he.GetAttribute("type") = "submit" And he.GetAttribute("value") = "公開" Then
he.InvokeMember("click") 'クリック
End If
Next
Do
Application.DoEvents()
Loop Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete And WebBrowser1.IsBusy = False

End Sub

End Class

3名無しさん:2016/08/10(水) 12:32:23
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q12134861647
本文にテキストを書き込む


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板