P
pcmagic
Unregistered / Unconfirmed
GUEST, unregistred user!
我有这样一个网页.
请能用NMHTTP.POST方法解决?有重谢!
我用了NMHTTP1.Post('http://10.40.5.182/cgi-bin/sendpage.pl?AcctNu='+edit1.text+'&CSurname='+edit2.text+'&Message='+edit3.text,'');不行
网页如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Page</title>
</head>
<body>
<p>请输入寻呼号码和留言信息(一次最多只能发送包括姓名在内的30个汉字和符号)</p><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.AcctNu.value == "")
{
alert("请在 Account Number 域中输入值。");
theForm.AcctNu.focus();
return (false);
}
if (theForm.AcctNu.value.length < 1)
{
alert("在 Account Number 域中,请至少输入 1 个字符。");
theForm.AcctNu.focus();
return (false);
}
if (theForm.AcctNu.value.length > 6)
{
alert("在 Account Number 域中,请最多输入 6 个字符。");
theForm.AcctNu.focus();
return (false);
}
var checkOK = "0123456789";
var checkStr = theForm.AcctNu.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("在 Account Number 域中,只能输入 0123456789 个字符。");
theForm.AcctNu.focus();
return (false);
}
var checkOK = "0123456789";
var checkStr = theForm.PagePswd.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("在 PagePswd 域中,只能输入 0123456789 个字符。");
theForm.PagePswd.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="post" action="http://10.40.5.182/cgi-bin/sendpage.pl" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<input type="hidden" name="Lang" value="2">
<table border="0" width="100%">
<tr>
<td width="22%">请输入寻呼号码</td>
<td width="78%"><!--webbot bot="Validation" S-Display-Name="Account Number" S-Data-Type="String" S-Allow-Other-Chars="0123456789" B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="6" --><input name="AcctNu" size="6" maxlength="6"></td>
</tr>
<tr>
<td width="22%">请输入您的姓氏:</td>
<td width="78%"><input name="CSurname" size="10"></td>
</tr>
<tr>
<td width="22%">请输入留言或复机号码:</td>
<td width="78%"><input name="Message" size="50"></td>
</tr>
<tr>
<td width="22%">您可以输入密码:</td>
<td width="78%"><!--webbot bot="Validation" S-Data-Type="String" S-Allow-Other-Chars="0123456789" --><input name="PagePswd"></td>
</tr>
</table>
<p><input type="submit" value="发送" name="B1"></p>
</form>
</body>
</html>
请能用NMHTTP.POST方法解决?有重谢!
我用了NMHTTP1.Post('http://10.40.5.182/cgi-bin/sendpage.pl?AcctNu='+edit1.text+'&CSurname='+edit2.text+'&Message='+edit3.text,'');不行
网页如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Page</title>
</head>
<body>
<p>请输入寻呼号码和留言信息(一次最多只能发送包括姓名在内的30个汉字和符号)</p><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.AcctNu.value == "")
{
alert("请在 Account Number 域中输入值。");
theForm.AcctNu.focus();
return (false);
}
if (theForm.AcctNu.value.length < 1)
{
alert("在 Account Number 域中,请至少输入 1 个字符。");
theForm.AcctNu.focus();
return (false);
}
if (theForm.AcctNu.value.length > 6)
{
alert("在 Account Number 域中,请最多输入 6 个字符。");
theForm.AcctNu.focus();
return (false);
}
var checkOK = "0123456789";
var checkStr = theForm.AcctNu.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("在 Account Number 域中,只能输入 0123456789 个字符。");
theForm.AcctNu.focus();
return (false);
}
var checkOK = "0123456789";
var checkStr = theForm.PagePswd.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("在 PagePswd 域中,只能输入 0123456789 个字符。");
theForm.PagePswd.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="post" action="http://10.40.5.182/cgi-bin/sendpage.pl" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<input type="hidden" name="Lang" value="2">
<table border="0" width="100%">
<tr>
<td width="22%">请输入寻呼号码</td>
<td width="78%"><!--webbot bot="Validation" S-Display-Name="Account Number" S-Data-Type="String" S-Allow-Other-Chars="0123456789" B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="6" --><input name="AcctNu" size="6" maxlength="6"></td>
</tr>
<tr>
<td width="22%">请输入您的姓氏:</td>
<td width="78%"><input name="CSurname" size="10"></td>
</tr>
<tr>
<td width="22%">请输入留言或复机号码:</td>
<td width="78%"><input name="Message" size="50"></td>
</tr>
<tr>
<td width="22%">您可以输入密码:</td>
<td width="78%"><!--webbot bot="Validation" S-Data-Type="String" S-Allow-Other-Chars="0123456789" --><input name="PagePswd"></td>
</tr>
</table>
<p><input type="submit" value="发送" name="B1"></p>
</form>
</body>
</html>