webbrowser自动填表,点击总是无效
<OBJECT style="VISIBILITY: visible" id=gc-invisible-audio name=gc-invisible-audio classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=1 height=1 movie="/voice/resources/951167711-audioJsApi.swf"><PARAM NAME="_cx" VALUE="26"><PARAM NAME="_cy" VALUE="26"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="/voice/resources/951167711-audioJsApi.swf"><PARAM NAME="Src" VALUE="/voice/resources/951167711-audioJsApi.swf"><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE="FFFFFF"><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"><PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0"><PARAM NAME="AllowNetworking" VALUE="all"><PARAM NAME="AllowFullScreen" VALUE="false"></OBJECT><SCRIPT type=text/javascript>
var _gcData = {
'contacts': {},
'contactPhones': {},
'rank': {},
'rankedContacts': {},
'phones': {},
'_rnr_se': 'UjHUrNBdJ4D3hUwNoDid2rRoLG4=',
'swfPath': '/voice/resources/3819333044-audioPlayer.swf',
'audioApiPath': '/voice/resources/951167711-audioJsApi.swf',
'mp3Prefix': 'https://www.google.com/voice',
'contactsUrl': 'https://www.google.com/voice/c/b/dtkz64733@yahoo.com',
'contactSyncTime': 0,
'cmVersion': 'ContactManager',
'v': '389',
'xpcUrl': 'https://clients4.google.com'
};
_gvRun(_gcData, 'en', true);
</SCRIPT>
<INPUT style="DISPLAY: none" id=history_state0 value=setup/ name=history_state0><IFRAME style="DISPLAY: none" id=history_iframe0 src='javascript:""'></IFRAME>
<UL hideFocus style="WIDTH: 60px; DISPLAY: none" class=goog-menu closure_uid_8ubg2p="22" unselectable="on">
<DIV id=:g class=goog-menuitem unselectable="on">
<DIV class=goog-menuitem-content unselectable="on">$10</DIV></DIV></UL> <IFRAME style="FILTER: alpha(opacity=0); BORDER-RIGHT-WIDTH: 0px; MARGIN-TOP: 24px; WIDTH: 1680px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT: 880px; VERTICAL-ALIGN: bottom; BORDER-LEFT-WIDTH: 0px" class=modal-dialog-bg src='javascript:""' frameBorder=0></IFRAME>
<DIV style="FILTER: alpha(opacity=50); MARGIN-TOP: 24px; WIDTH: 1680px; HEIGHT: 880px" class=modal-dialog-bg></DIV>
<DIV style="TOP: 211px; LEFT: 634px" class="modal-dialog goog-shadow gc-setup" closure_uid_8ubg2p="96">
<DIV class="modal-dialog-container goog-shadow-content" tabIndex=0>
<DIV id=:i class="modal-dialog-title modal-dialog-title-draggable" closure_uid_8ubg2p="85"><SPAN class=modal-dialog-title-text>Step 1 of 4: Choose your number
<DIV class=gc-setup-sign-out><A href="http://www.google.com/support/voice/bin/answer.py?hl=en&answer=150640" target=_blank>Help</A></DIV></SPAN><SPAN style="DISPLAY: none" class=modal-dialog-title-close closure_uid_8ubg2p="86"></SPAN></DIV>
<DIV style="WIDTH: auto; HEIGHT: auto" class=modal-dialog-content>
<DIV id=gc-setup-view>
<DIV style="DISPLAY: none" id=gc-setup-msg class=gc-setup-msg></DIV>
<DIV>
<FORM id=gc-setup-search-form onsubmit="return false;" method=post action=# closure_uid_8ubg2p="41"><INPUT value=UjHUrNBdJ4D3hUwNoDid2rRoLG4= type=hidden name=_rnr_se>
<DIV style="PADDING-TOP: 15px" id=gc-setup-search-pane class=gc-setup-content>
<DIV id=gc-setup-initial-search-fields>
<DIV>First, we need you to pick a new Google number. When anyone calls this number, it will ring all of your phones. <A href="https://www.google.com/voice/?setup=2#setupvm/">Just want voicemail for your cell?</A> </DIV>
<DIV style="MARGIN: 24px 0px 0px">
<DIV class=goog-inline-block>
<DIV class=gc-setup-search-label>Area code, city or zip code</DIV><INPUT style="WIDTH: 126px" class="gc-text gc-setup-location-search gc-search-initial" tabIndex=1 value=415 maxLength=50 size=50 name=areacode mT> </DIV>
<DIV style="PADDING-BOTTOM: 10px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; FONT-WEIGHT: bold; PADDING-TOP: 10px" class="goog-inline-block gc-setup-search-label">and/or</DIV>
<DIV style="MARGIN-RIGHT: 12px" class=goog-inline-block>
<DIV class=gc-setup-search-label>Word, phrase, number</DIV><INPUT style="WIDTH: 104px" class="gc-text gc-setup-phrase-search gc-search-initial" tabIndex=2 name=phrase> </DIV></DIV>
<DIV style="PADDING-TOP: 12px">
<DIV class="goog-button goog-button-base gc-setup-step-link gc-setup-search-button gc-setup-centered goog-inline-block" tabIndex=0 closure_uid_8ubg2p="38" unselectable="on">
<DIV class="goog-inline-block goog-button-base-outer-box" unselectable="on">
<DIV class="goog-inline-block goog-button-base-inner-box" unselectable="on">
<DIV class=goog-button-base-pos unselectable="on">
<DIV class=goog-button-base-top-shadow unselectable="on"> </DIV>
<DIV class=goog-button-base-content unselectable="on">Search available numbers</DIV></DIV></DIV></DIV></DIV></DIV></DIV>
我想点击这个div的按钮,可是无反应,这个是js动态加载的,是一个层
<DIV class=goog-button-base-content unselectable="on">Search available numbers</DIV>
--------------------编程问答-------------------- 试试
foreach (HtmlEelemnt element in webbrowser1.Document.GetElementsByTagName("DIV"))
{
string classValue = element.GetAttribute("class");
if (!String.IsNullOrEmpty(classValue) && string.Compare(classValue, "goog-button-base-content", true) == 0)
{
element.InvokeMember("click");
}
}
--------------------编程问答-------------------- string classValue = element.GetAttribute("className")
这样子才可以获得class的名,不过也是没反应 --------------------编程问答-------------------- 关注中~~~~~~~~~~~~~~~~~~~~~~~`
补充:.NET技术 , C#