web页面模拟c/s模式从数据库区的数据的方法:
1.通过组件 Msxml2.XMLHTTP
http://blog.csdn.net/loveyon/archive/2005/05/25/380826.aspx
2.通过iframe
function checkNick() {
var nick = document.getElementById("username").value;
if (nick == "") {
return false;
}
if (nick == lastNick) {
return false;
}
document.checkNickForm.TPL_NICK.value = nick;
document.getElementById("check_username_info").innerHTML = "检测中,请稍等...";
document.getElementById("check_username_info").className = "WarningMsg";
document.checkNickForm.submit();
return true;
}
<iframe id="frameCheckForm" name="frameCheckForm" src="about:blank" width="0" height="0" scrolling="no"></iframe>
<form name=checkNickForm action="http://member1.taobao.com/member/check_nick.jhtml" method="post" target="frameCheckForm">
<input type="hidden" name="TPL_NICK">
<input type="hidden" name="action" value="account_mgr" />
<input type="hidden" name="event_submit_do_check_nick" value="anything" />
</form>
<input type="button" name="check_username" value="检查会员名是否可用" onClick="return checkNick();" onMouseOver="this.style.cursor='hand';"/>