758x100.js
上传用户:dasheng
上传日期:2013-03-08
资源大小:165k
文件大小:4k
源码类别:

DNA

开发平台:

Visual C++

  1. var container;
  2. if(top!=self)
  3. container = window.location;
  4. else
  5. container = window.top.location;
  6. spId=getsid();
  7. var sid;
  8. function getsid(){
  9. var result="0";
  10. if(sid!=null){result=sid;}
  11. return result;
  12. }
  13. 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)
  14.    {
  15.       alert("小灵通号码输入过长!");
  16.          document.formv_050114_758100.phonenum.focus();
  17. return false;
  18.    }
  19. if(str.length < 8)
  20. {
  21. alert("小灵通号码请输入区号!");
  22.          document.formv_050114_758100.phonenum.focus();
  23. return false;
  24. }
  25.          var url="http://v.21cn.com/alliance/UnionRegisterByXLT_2.jsp";
  26.  document.formv_050114_758100.action=url;
  27.  document.formv_050114_758100.user_from.value=vid;
  28.  document.formv_050114_758100.container.value=container;
  29.  return true;
  30.     }
  31.  else if(!isValid2||!isValid1)
  32.     {
  33.         alert("手机号码输入错误!");
  34.         document.formv_050114_758100.phonenum.focus();
  35.         return false;
  36.     }
  37.     return true;
  38. }
  39. document.writeln("");
  40. document.writeln("");
  41. document.writeln("<table width="758"  height="100" border="0" cellspacing="0" cellpadding="0">");
  42. document.writeln("  <tr>");
  43. 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">");
  44. 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">");
  45. document.writeln("        <param name="quality" value="high">");
  46. 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>");
  47. document.writeln("    </object></td>");
  48. 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">");
  49. document.writeln("        <form method="post" name="formv_050114_758100" action="http://v.21cn.com/alliance/UnionRegisterBySMS_2.jsp" onSubmit="return checkphonenumForm050114758(this);" target="_blank">");
  50. document.writeln("          <tr> ");
  51. document.writeln("            <td width="68%" height="47" align="right" valign="bottom"><div align="center"> ");
  52. document.writeln("                <input type="text" name="phonenum">");
  53. document.writeln("                <input type="hidden" name="user_from" value="">");
  54. document.writeln("                <input type="hidden" name="container" value="">");
  55. document.writeln("              </div></td>");
  56. document.writeln("          </tr>");
  57. document.writeln("          <tr> ");
  58. 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>");
  59. document.writeln("          </tr>");
  60. document.writeln("        </form>");
  61. document.writeln("      </table></td>");
  62. document.writeln("  </tr>");
  63. document.writeln("</table>");