<Script Language="JavaScript">
<!--
function SendMsg() {
TheForm.submit();
TheForm.Msg.value="";
}
-->
</Script>
<Form Action="" Method="Post" Name="TheForm">
<Input Type="Text" Id="Msg">
<Input Type=Button Value="发言" OnClick="SendMsg()">
</Form>
<!--
function SendMsg() {
TheForm.submit();
TheForm.Msg.value="";
}
-->
</Script>
<Form Action="" Method="Post" Name="TheForm">
<Input Type="Text" Id="Msg">
<Input Type=Button Value="发言" OnClick="SendMsg()">
</Form>
<!--
function go() {
if (Theform.message.value=="") {
alert ("你没发言");
return false;
}else {
TheForm.message.value="";
return true;
}
}
-->
</Script>
<Form Action="" Method="Post" Name="TheForm" onsubmit="return go()">
<Input Type="Text" id="message">
<Input Type="submit" Value="发送">
</Form>
{
var m,n,laststr;
if (str=="") return str;
for(m=0;m<str.length;m++)
{
if (str.substr(m,1)!=" ") break;
}
for (n=str.length-1;n>0;n--)
{
if (str.substr(n,1)!=" ") break;
}
laststr=str.substr(m,n-m+1);
return laststr;
}
function send(form)
{
if (trim(form.msg.value)=="")
{
alert('不能发空信息!');form.msg.value="";form.msg.focus();return false;
}else
{
form.msg.focus();
form.submit();
form.msg.value="";
return false;
}
}