如何限制同一个IP连续发送两次信息,在线等
如何限制同一个IP连续发送两次信息出去呀?我不懂ASP程序呀,可上面的叫我改,这可怎么办呀?哪位好心人帮我看下如何呀?
可不可以到这里面加语句限制呢?
<SCRIPT language=JavaScript>
function com(theForm)
{
var dd=theForm.u_price.value;
if( dd.match ("^[0-9-.]+$") == null)
{
alert("您的出价必须为数字!");
theForm.u_price.focus();
return (false);
}
// if (parseInt(theForm.u_price.value) <= parseInt(theForm.price.value) + parseInt(theForm.hidden_add.value))
if ((parseInt(theForm.u_price.value) > parseInt(theForm.price.value) + parseInt(theForm.hidden_add.value)) || (parseInt(theForm.u_price.value) <= parseInt(theForm.price.value)+5) || (parseInt(theForm.u_price.value) >399))
{
alert("加价不得少于5元,不大于当前加幅价且不能大于当前最高价");
theForm.u_price.focus();
return (false);
}
if (theForm.u_id.value.toLowerCase()==theForm.pic_userid2.value.toLowerCase())
{
alert("您不能连续发送两次!"); //这只是针对ID
theForm.u_id.focus();
return (false);
}
return (true);
}
</SCRIPT>