我想编一个四六级查询器,从 http://cet.99sushe.com/ 这个网站上获取本校所有 学生四六级的成绩导入ecel,用的webbrowser控件,但是模拟输入准考证和验证码查询后要读15秒倒计时(如下图),这个大大影响了查询的速度,想请教高手,如何让它不读秒直接显示数据? 这是一个正确的六级准考号 520010092209024
解决方案 »
- VB做一个同样大小的文本框覆盖在百度搜索框上面
- 将access表中的数据导入sql server代码出错,在线等!谢谢!
- 用CreateFontIndirect创建的字体赋给textbox或richtextbox后能否使原有文本按该字体显示?
- 高分求教:怎样用ADOX删除字段
- 已知網絡上電腦的名稱和IP如何獲得它的網卡MAC地址? 很急!!!
- 如何把我的程序在win98中注册为系统服务 (我送出1000分)
- 一个500分的 问题 回答了给足500分
- 找到新工作 与大家同乐 送分
- 问execute()的使用方法
- 发现一个VB的bug,请大家试一试
- vb6.0调用GetPrivateProfileString出错
- VB多工程的问题
然后自己直接用WINSOCK发送一个封包过去获取到源码
在绑到webbrowser上去就行了
var ajax = new Ajax();
var param = "id=" + tid + "&sid=" + sid + "&vc=" + vcode;
ajax.Post("/getscore.html",param , search_callback);
}
这个是它发送的东西 tid是准考证号, sid ,vcode好像有一个是识别码,我搞不清楚了,我把js的源文件下来了,谁懂js帮忙看一下
下面还有,一下子发布完
var testid = "";
var score = "";
var contenthtml = "";
var sec = 15;
var netschoolname = "";
String.prototype.trim = function(){
return this.replace(/(^\s*)|(\s*$)/g, "");
}
function gid(id) {return document.getElementById(id);}
function assertFormat(tid){
var reg = /^\d{1,}$/;
var gs = true;
if (!reg.test(tid)) gs = false;
else {
if (tid.length == 15) {
if (tid.substr(6, 3) != "092" || get_testtype(tid) == "") gs = false;
}
else if (tid.length == 13) {
if (tid.substr(0, 3) != "092") gs = false;
}
else gs = false;
}
if(!gs){
alert("准考证号格式不正确");
return false;
}
else {
var pp = true;
if (tid.length == 13 && !gid("t3").checked) pp = false;
else {
for (var i = 1; i <= 2; i++) {
if (gid("t" + i).checked) {
if (tid.substr(9, 1) != gid("t" + i).value) {
pp = false;
}
}
}
}
if (!pp) {
alert("考试类型和准考证号不匹配");
return false;
}
}
return true;
}
var testid_c = gid("id");
var c = assertFormat(testid_c.value.trim());
if(!c) {
testid_c.focus();
return;
}
var sid_v = GetCookie("sid");
if (sid_v == null) {
alert("请开启COOKIE支持");
return;
}
var reg = /^\d{4}$/;
var vc_v = gid("vc").value.trim();
if (!reg.test(vc_v) || gid("vc_img").style.display == "none") {
alert("验证码不正确");
gid("vc").focus();
return;
}
testid = testid_c.value.trim();
if (contenthtml == "") contenthtml = gid("content").innerHTML;
setTimeout("search('" + testid + "','"+sid_v+"','"+vc_v+"')", 0);
wait();
}
function wait(){
var sec_all = sec;
var waithtml = "<div id='score_result'><h1></h1><div id='score_inner'>";
if (gid("jsq_ad_box")) {
waithtml += "<div class='wait_title' style='margin-top:50px;color:red;'>免费获得Q币和iPod播放器,参加右侧活动赢取吧!</div>";
waithtml += "<div id='time'>" + sec + "</div>";
waithtml += "<div class='wait_title' style='margin-top:10px;'>系统正在查询中请稍候</div>";
waithtml += "<div class='wait_footer'>网速过慢可能会影响您的等待时间</div>";
}
else{
waithtml += "<div class='wait_title' style='margin-top:80px;'>系统正在查询中请稍候</div>";
waithtml += "<div id='time'>" + sec + "</div>";
}
waithtml += "</div></div>";
gid("content").innerHTML = waithtml;
wait_time(sec_all);
}
if (waitsec > 0) {
if (score == "0") {
alert("验证码不正确");
gid("content").innerHTML = contenthtml;
gid("id").value = testid;
gid("vc_img").src = "/validatecode?v=" + new Date();
gid("vc").focus();
testid = "";
score = "";
}
else if (score == "-1") {
alert("网络繁忙,请稍后尝试");
gid("content").innerHTML = contenthtml;
gid("id").value = testid;
gid("vc_img").src = "/validatecode?v=" + new Date();
testid = "";
score = "";
}
else {
gid("time").innerHTML = waitsec;
waitsec--;
setTimeout("wait_time(" + waitsec + ")", 1000);
}
}
else{
showscore(score);
}
}
function showscore(tscore){
var name = "";
var school = "";
var sarray=new Array();
if(tscore != ""){
sarray = tscore.split(',');
if (sarray.length >= 7) {
name = sarray[6];
school = sarray[5];
}
else if(sarray.length >= 3){
name = sarray[2];
school = sarray[1];
}
}
var resulthtml = "<div id='score_result'><h1>2009年12月考试成绩查询结果:</h1><div id='score_inner'>";
resulthtml += "<dl>";
if(name != "") resulthtml += "<dt class='dtleft'>考生姓名:</dt><dd class='ddright'>"+name+"</dd>";
if(school != "") resulthtml += "<p><dt class='dtleft'>学校:</dt><dd class='ddright'>" + school + "</dd>";
resulthtml += "<p><dt class='dtleft'>考试类别:</dt><dd class='ddright'>";
resulthtml += get_testtype(testid);
resulthtml += "</dd><dt></dt><dd style='height:0px;overflow:hidden;clear:both;'></dd>";
resulthtml += "<dt class='dtleft'>准考证号:</dt><dd class='ddright'>";
resulthtml += testid;
resulthtml += "</dd></dl><ul>";
if(tscore == "") resulthtml += "<li style='height:60px;'>无法找到对应准考证号的分数,请确认你输入的准考证号无误</li>";
else {
if (sarray.length >= 7) {
resulthtml += "<li><div class='lileft'>您的成绩总分:</div><div class='liright' style='font-weight:bold;'>" + sarray[4] + "</div></li>";
resulthtml += "<li><div class='lileft'>听力:</div><div class='liright'>" + sarray[0] + "</div></li>";
resulthtml += "<li><div class='lileft'>阅读:</div><div class='liright'>" + sarray[1] + "</div></li>";
resulthtml += "<li><div class='lileft'>综合:</div><div class='liright'>" + sarray[2] + "</div></li>";
resulthtml += "<li><div class='lileft'>写作:</div><div class='liright'>" + sarray[3] + "</div></li>";
}
else if (sarray.length >= 3) {
resulthtml += "<li><div class='lileft'>您的成绩总分:</div><div class='liright' style='font-weight:bold;'>" + sarray[0] + "</div></li>";
}
else {
resulthtml += "<li><div class='lileft'>您的口语等级为:</div><div class='liright' style='font-weight:bold;'>" + sarray[0] + "</div></li>";
}
}
resulthtml += "</ul><div style='text-align:center;'>姓名中的生僻字可能无法正常显示,以成绩单为准</div></div>";
resulthtml += "<p class='lang' style='margin-top:-10px;text-align:center;'><input id='btn' type='button' value='返回' onclick='re_search();' /></p>";
resulthtml += "</div>";
gid("content").innerHTML = resulthtml;
}