<HTML><HEAD><TITLE>StarFun</TITLE>
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>
<META content="" name=Keywords>
<META content="" name=description>
<META content="" name=Title>
<META content="" name="Creation Date">
<META content="" name="Author name">
<META content="thehub" name=SearchCat><LINK
href="
http://www.starhub.com.sg/styles/pc_apr_ie.css" rel=stylesheet type=text/css>
<SCRIPT language=JavaScript src="
http://www.starhub.com.sg/includes/scripts/browser_detect.js"></SCRIPT>
<SCRIPT language=JavaScript src="
http://www.starhub.com.sg/includes/scripts/style_sp_loader.js"></SCRIPT>
<script language="JavaScript">
function checkform(form) {
temp = form.mobile.value
if (temp.length == 0){
alert("Please enter mobile number.")
form.mobile.focus();
return false;
}
else if (temp.length < 8){
alert("StarHub mobile numbers are 8 digits in length. Please try again.")
form.mobile.focus();
return false;
}
else if ((temp.length == 8) && ((temp.substring(0,1) != 8) && (temp.substring(0,1) != 9))) {
alert("The mobile number you entered is of an invalid format.")
form.mobile.focus();
return false;
}
return true;
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) { // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
alert("Sorry! You have exceeded the limit of 160 characters!");
// otherwise, update 'characters left' counter
}
countfield.value = maxlimit - field.value.length;
}
</script>
<script type='text/javascript' src='
http://www.starhub.com.sg/navscripts/choose.js'></script>
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<!--Start top nav-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=772>
<TBODY>
<TR>
<TD vAlign=top><!--Start CONTENT--><!--Start Body Content-->
<!--End Body Content-->
<!--Start Imported Body-->
<TABLE WIDTH="560" cellpadding="0" cellspacing="0" border="0">
<TR>
<TD>
<table border="0" cellpadding="0" cellspacing="0" width="560">
<tr>
<td class="content">
<form action="
http://www.starhub.com.sg/servlet/SMSServlet" method="POST" onSubmit="return checkform(SMSForm);" name="SMSForm">
<table width="340" border="0" ="0" bgcolor="#00cc00" cellpadding="2" cellspacing="1">
<tr>
<td valign="top" class="tableheaderwhite" > Mobile
Phone Number :
<input type="text" size="10" name="mobile" value="" maxlength="8" onChange="updatelink(SMSForm);"></td>
</tr>
<tr bgcolor="#ccff99">
<td valign="top" class="contentbold"> Message :<br>
<textarea name="msg" rows="4" cols="35" onKeyDown="textCounter(this.form.msg,this.form.numleft,160);" onKeyUp="textCounter(this.form.msg,this.form.numleft,160);"></textarea></td>
</tr>
<tr>
<td valign="top"> <span class="tableheaderwhite"> No.
of characters remaining:</span>
<input type="text" name="numleft" size="5" maxlength="3" value="160" disabled>
</td>
</tr>
<tr bgcolor="#ccff99">
<td valign="middle">
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
function updatelink(frm) {
frm.linkname.value = "
http://www.starhub.com.sg/starfun/index.asp?pid=" + document.SMSForm.mobile.value + "&message=";
}
-->
</SCRIPT>
<input type="hidden" name="linkname" value="
http://www.starhub.com.sg/starfun/index.asp?pid=0&message=">
<input type="hidden" name="host" value="SHCORP">
<input type="image" src="
http://www.starhub.com.sg/starfun/images/button_sendsms.gif" width="65" height="19" border="0"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<!--End Imported Body -->
<!--End CONTENT--></TD>
</TR></TBODY></TABLE>
<!--End MAIN TABLE CONTENTS-->
<!--Start Footer-->
<!--End MAIN TABLE CONTENTS-->
<!--Start Footer-->
</BODY>
</HTML>
===================
我不保证肯定能用
我不保证这是最简单的代码
希望大家喜欢