document.register.submit()问题

haonanernet 2005-04-24 10:29:27
js函数
function sendsms()
{
var http = new ActiveXObject("Microsoft.XMLHTTP");
http.open("GET","http://...../..../.........php?destMobile="+document.register.mobilecode.value+"&content="+document.register.textarea.value,false);
http.send();

document.register.submit()
}


1.asp
<form name="register" method="post" action="2.asp"align="right">
....
....
<input name="button" type="button" onClick="sendsms()"value="发送短信">
....
....
</form>


2.asp



为什么点击"发送短信"没有反应,应该执行sendsms()再跳转到 2.asp才对啊
还是这句document.register.submit() 不是表单提交
...全文
509 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
你换成这个样子的得到value 也可以的,

方法无论哪种都好document.register.mobilecode.value
  • 打赏
  • 举报
回复
document.register.submit();
->少加个;

function choicefolder(){
document.all.form1.action="choicefolder.asp";
document.all.form1.target="_self";
document.all.form1.method="post";
document.all.form1.submit();
}这个是我用的发送
  • 打赏
  • 举报
回复
不会执行的,这是我的猜测不一定正确的
haonanernet 2005-04-24
  • 打赏
  • 举报
回复
还有个问题想问您
function sendsms()
{
document.register.submit()

var http = new ActiveXObject("Microsoft.XMLHTTP");
http.open("GET","http://...../..../.........php?destMobile="+document.register.mobilecode.value+"&content="+document.register.textarea.value,false);
http.send();


}


如果象上面那样写?
var http = new ActiveXObject("Microsoft.XMLHTTP");
http.open("GET","http://...../..../.........php?destMobile="+document.register.mobilecode.value+"&content="+document.register.textarea.value,false);
http.send();
会不会执行呢


28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧