网页地址:
http://my.pay.qq.com/account/account_login.shtml?url=%2Faccount%2Findex.shtml主要源码
<body>
<!---->
<div class="main" id=login style="border:0px;"><div id="qlogin" style="display:none;"></div>
<div id="web_login">
<form id="loginform" autocomplete="off" name="loginform" action="http://ptlogin2.qq.com/login" method="post"
onsubmit="if(!isAbleSubmit){return false;};return ptui_onLoginEx(loginform, 'qq.com')" onreset="return onFormReset(loginform)" target="_self" style="margin:0px;">
<ul id="g_list">
<li id="err_m" class="err_m"></li>
<li id="g_u"><span><u id="label_uin">QQ帐号:</u></span>
<input type="text" class="inputstyle" id="u" name="u" value="" style="ime-mode:disabled" tabindex="1"
onfocus="try{ptui_onUserFocus('u', '#000000')}catch(e){}" onblur="try{ptui_onUserBlue('u', '#CCCCCC');}catch(e){}check();" />
<label><a target="_blank" href="http://zc.qq.com?from=pt" tabindex="7" id="label_newreg">注册新帐号</a></label></li>
<li id="g_p"><span><u id="label_pwd">QQ密码:</u></span>
<input type="password" class="inputstyle" id="p" name="p" value="" maxlength="16" tabindex="2" onfocus="check();" />
<label><a target="_blank" tabindex="8" href="http://ptlogin2.qq.com/ptui_forgetpwd" onclick="onClickForgetPwd()" id="label_forget_pwd">忘了密码?</a></label></li>
<li id="verifyinput" style="display:none;"><span for="code"><u id="label_vcode">验证码:</u></span>
<input name="verifycode" type="text" style="ime-mode:disabled" class="inputstyle" id="verifycode" value="" maxlength="5" tabindex="3"/></li>
<li id="verifytip" style="display:none;"><span> </span>
<u id="label_vcode_tip">输入下图中的字符,不区分大小写</u></li>
<li id="verifyshow" style="display:none;"><span for="pic"> </span>
<img id=imgVerify width='130' height='53' onload='imgLoadReport()'>
<label><a id="changeimg_link" tabindex="6" >看不清,换一张</a></label>
</li>
</ul>
<div class="login_button">
<input type="submit" tabindex="5" disabled="disabled" value="登 录" class="btn" id="login_button" /></div>
<div class="lineright" id="label_unable_tips"><span id="label_qlogin_tips" ><img src="http://imgcache.qq.com/ptlogin/v4/style/0/images/load.gif" align="absmiddle">
正在检测能否快速登录...</span></div>
<input type="hidden" name="aid" value="11000101" />
<input type="hidden" name="u1" value="http://my.pay.qq.com/account/index.shtml" />
<input type="hidden" name="fp" value="loginerroralert" />
<input type="hidden" name="h" value="1" />
<input type="hidden" name="ptredirect" value="1" />
<input type="hidden" name="ptlang" value="2052" />
<input type="hidden" name="ep" value="http://pay.qq.com/cgi-bin/login/qqacctlogin.cgi" /><input type="hidden" name="from_ui" value="1" />
<input type="hidden" name="dumy" value="" />
</form>
</div>
<div id="switch" class="lineright"><a onclick=""></a></div>
</div>
<script language="javascript">var g_f=$("loginform");if((g_appid==46000101)&&(g_f.u.value=="<请输入帐号>")){g_f.u.value="支持微博帐号/QQ号码/邮箱地址";
var wb_tips=document.createElement("li");
wb_tips.style.paddingTop="0";
wb_tips.style.color="gray";
wb_tips.id="wb_tips";
wb_tips.innerHTML="<span> </span> "+"未登录QQ或者浏览器不支持快速登录";
$("u").value="";
$("u").color="";
$("g_list").insertBefore(wb_tips,$("g_p"));
}g_time.time3=new Date();</script>
</body>
想实现功能:
1. 自动填充那2个文本框的值,内容就是qq号和密码,自动点登录提交
2. 如果不用WebBrowser控件,有其他方法也行,如post法
谢谢,高分请教!
http://my.pay.qq.com/account/account_login.shtml?url=%2Faccount%2Findex.shtml主要源码
<body>
<!---->
<div class="main" id=login style="border:0px;"><div id="qlogin" style="display:none;"></div>
<div id="web_login">
<form id="loginform" autocomplete="off" name="loginform" action="http://ptlogin2.qq.com/login" method="post"
onsubmit="if(!isAbleSubmit){return false;};return ptui_onLoginEx(loginform, 'qq.com')" onreset="return onFormReset(loginform)" target="_self" style="margin:0px;">
<ul id="g_list">
<li id="err_m" class="err_m"></li>
<li id="g_u"><span><u id="label_uin">QQ帐号:</u></span>
<input type="text" class="inputstyle" id="u" name="u" value="" style="ime-mode:disabled" tabindex="1"
onfocus="try{ptui_onUserFocus('u', '#000000')}catch(e){}" onblur="try{ptui_onUserBlue('u', '#CCCCCC');}catch(e){}check();" />
<label><a target="_blank" href="http://zc.qq.com?from=pt" tabindex="7" id="label_newreg">注册新帐号</a></label></li>
<li id="g_p"><span><u id="label_pwd">QQ密码:</u></span>
<input type="password" class="inputstyle" id="p" name="p" value="" maxlength="16" tabindex="2" onfocus="check();" />
<label><a target="_blank" tabindex="8" href="http://ptlogin2.qq.com/ptui_forgetpwd" onclick="onClickForgetPwd()" id="label_forget_pwd">忘了密码?</a></label></li>
<li id="verifyinput" style="display:none;"><span for="code"><u id="label_vcode">验证码:</u></span>
<input name="verifycode" type="text" style="ime-mode:disabled" class="inputstyle" id="verifycode" value="" maxlength="5" tabindex="3"/></li>
<li id="verifytip" style="display:none;"><span> </span>
<u id="label_vcode_tip">输入下图中的字符,不区分大小写</u></li>
<li id="verifyshow" style="display:none;"><span for="pic"> </span>
<img id=imgVerify width='130' height='53' onload='imgLoadReport()'>
<label><a id="changeimg_link" tabindex="6" >看不清,换一张</a></label>
</li>
</ul>
<div class="login_button">
<input type="submit" tabindex="5" disabled="disabled" value="登 录" class="btn" id="login_button" /></div>
<div class="lineright" id="label_unable_tips"><span id="label_qlogin_tips" ><img src="http://imgcache.qq.com/ptlogin/v4/style/0/images/load.gif" align="absmiddle">
正在检测能否快速登录...</span></div>
<input type="hidden" name="aid" value="11000101" />
<input type="hidden" name="u1" value="http://my.pay.qq.com/account/index.shtml" />
<input type="hidden" name="fp" value="loginerroralert" />
<input type="hidden" name="h" value="1" />
<input type="hidden" name="ptredirect" value="1" />
<input type="hidden" name="ptlang" value="2052" />
<input type="hidden" name="ep" value="http://pay.qq.com/cgi-bin/login/qqacctlogin.cgi" /><input type="hidden" name="from_ui" value="1" />
<input type="hidden" name="dumy" value="" />
</form>
</div>
<div id="switch" class="lineright"><a onclick=""></a></div>
</div>
<script language="javascript">var g_f=$("loginform");if((g_appid==46000101)&&(g_f.u.value=="<请输入帐号>")){g_f.u.value="支持微博帐号/QQ号码/邮箱地址";
var wb_tips=document.createElement("li");
wb_tips.style.paddingTop="0";
wb_tips.style.color="gray";
wb_tips.id="wb_tips";
wb_tips.innerHTML="<span> </span> "+"未登录QQ或者浏览器不支持快速登录";
$("u").value="";
$("u").color="";
$("g_list").insertBefore(wb_tips,$("g_p"));
}g_time.time3=new Date();</script>
</body>
想实现功能:
1. 自动填充那2个文本框的值,内容就是qq号和密码,自动点登录提交
2. 如果不用WebBrowser控件,有其他方法也行,如post法
谢谢,高分请教!
WebBrowser1.Document.getElementById("p").value = "密码"
WebBrowser1.Document.getElementById("u").value = "qq号码"
在document_complete事件里增加
If not pDisp Is WebBrowser1.Object Then exit sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim vDoc
'If WebBrowser1.Busy Then Exit Sub
If not pDisp Is WebBrowser1.Object Then exit sub Set vDoc = WebBrowser1.Document
vDoc.getElementById("u").Value = "qq号码"
vDoc.getElementById("p").Value = "密码"
End Sub
Dim uu As Object, pp As Object
Set uu = pDisp.Document.getElementById("u")
Set pp = pDisp.Document.getElementById("p")
If Not uu Is Nothing And Not pp Is Nothing Then
uu.Value = "qq号码"
pp.Value = "密码"
End If
End Sub
如果不用WebBrowser控件,有其他方法吗