758x100.js
上传用户:dasheng
上传日期:2013-03-08
资源大小:165k
文件大小:4k
- var container;
- if(top!=self)
- container = window.location;
- else
- container = window.top.location;
- spId=getsid();
- var sid;
- function getsid(){
- var result="0";
- if(sid!=null){result=sid;}
- return result;
- }
- function checkphonenumForm050114758(form){ var pattern = /^13([0-9]){1}([0-9]){8}/; var isValid = pattern.test(document.formv_050114_758100.phonenum.value); var pattern2 = /^0([0-9]){2,11}/; var isValid2 = pattern2.test(document.formv_050114_758100.phonenum.value); var str=document.formv_050114_758100.phonenum.value; if(str.length<9) { alert("小灵通用户请输入区号,例子:02081234567"); document.formv_050114_758100.phonenum.focus(); return false; } if(isValid) { if (str.length != 11) { alert("手机号码输入错误!"); document.formv_050114_758100.phonenum.focus(); } var url="http://v.21cn.com/alliance/UnionRegisterBySMS_2.jsp"; document.formv_050114_758100.action=url; document.formv_050114_758100.user_from.value=vid; document.formv_050114_758100.container.value=container; return true; } if(isValid2) { if (str.length > 13)
- {
- alert("小灵通号码输入过长!");
- document.formv_050114_758100.phonenum.focus();
- return false;
- }
- if(str.length < 8)
- {
- alert("小灵通号码请输入区号!");
- document.formv_050114_758100.phonenum.focus();
- return false;
- }
- var url="http://v.21cn.com/alliance/UnionRegisterByXLT_2.jsp";
- document.formv_050114_758100.action=url;
- document.formv_050114_758100.user_from.value=vid;
- document.formv_050114_758100.container.value=container;
- return true;
- }
-
- else if(!isValid2||!isValid1)
- {
- alert("手机号码输入错误!");
- document.formv_050114_758100.phonenum.focus();
- return false;
- }
- return true;
- }
- document.writeln("");
- document.writeln("");
- document.writeln("<table width="758" height="100" border="0" cellspacing="0" cellpadding="0">");
- document.writeln(" <tr>");
- document.writeln(" <td width="556"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="556" height="100">");
- document.writeln(" <param name="movie" value="http://imguv.21cn.com/poster/050114/758100/758x100.swf"><param name="FlashVars" value="user_from=" +vid+"&sms_from="+spId+ "&container=" + container + "&channel=000">");
- document.writeln(" <param name="quality" value="high">");
- document.writeln(" <embed src="http://imguv.21cn.com/poster/050114/758100/758x100.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="556" height="100"></embed>");
- document.writeln(" </object></td>");
- document.writeln(" <td width="202"><table width="100%" height="100" border="0" cellpadding="0" cellspacing="0" background="http://imguv.21cn.com/poster/050114/758100/4.jpg">");
- document.writeln(" <form method="post" name="formv_050114_758100" action="http://v.21cn.com/alliance/UnionRegisterBySMS_2.jsp" onSubmit="return checkphonenumForm050114758(this);" target="_blank">");
- document.writeln(" <tr> ");
- document.writeln(" <td width="68%" height="47" align="right" valign="bottom"><div align="center"> ");
- document.writeln(" <input type="text" name="phonenum">");
- document.writeln(" <input type="hidden" name="user_from" value="">");
- document.writeln(" <input type="hidden" name="container" value="">");
- document.writeln(" </div></td>");
- document.writeln(" </tr>");
- document.writeln(" <tr> ");
- document.writeln(" <td height="43" align="right" valign="bottom"><input name="imageField" type="image" src="http://imguv.21cn.com/poster/050114/758100/3.jpg" width="122" height="43" border="0"></td>");
- document.writeln(" </tr>");
- document.writeln(" </form>");
- document.writeln(" </table></td>");
- document.writeln(" </tr>");
- document.writeln("</table>");