Advertisement
Guest User

Untitled

a guest
Dec 24th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.28 KB | None | 0 0
  1. <html><head><title>histnick</title>
  2.  
  3. <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
  4. <script type="text/javascript" language="JavaScript">
  5. function checkempty(event)
  6. {
  7.   if (document.formHist.user.value == '')
  8.   {
  9.     document.formHist.user.focus();
  10.     alert('user empty');
  11.     return false;
  12.   }
  13.   if (document.formHist.password.value == '')
  14.   {
  15.     document.formHist.password.focus();
  16.     alert('pass empty');
  17.     return false;
  18.   }
  19.   if (document.formHist.nick.value == '')
  20.   {
  21.     document.formHist.nick.focus();
  22.     alert('empty nick');
  23.     return false;
  24.   }
  25.   return true;
  26. }
  27.  
  28. function doOnLoad()
  29. {
  30.   document.formHist.nick.focus();
  31. }
  32.  
  33. function filteredClick()
  34. {
  35.   if (!checkempty())
  36.     return;
  37.   d=document;
  38.   f=d.createElement("form");
  39.   f.setAttribute("method","post");
  40.   f.setAttribute("action","histnickflt");
  41.   f.setAttribute("onSubmit","return checkempty(event);");
  42.   h1=d.createElement("input");
  43.   h1.setAttribute("type","hidden");
  44.   h1.setAttribute("name","user");
  45.   h1.setAttribute("value",document.formHist.user.value);
  46.   h2=d.createElement("input");
  47.   h2.setAttribute("type","hidden");
  48.   h2.setAttribute("name","password");
  49.   h2.setAttribute("value",document.formHist.password.value);
  50.   h3=d.createElement("input");
  51.   h3.setAttribute("type","hidden");
  52.   h3.setAttribute("name","nick");
  53.   h3.setAttribute("value",document.formHist.nick.value);
  54.   f.appendChild(h1);
  55.   f.appendChild(h2);
  56.   f.appendChild(h3);
  57.   d.body.appendChild(f);
  58.   f.submit();
  59. }
  60. </script>
  61. </head>
  62. <body onload="doOnLoad();">
  63.   <font size="3" face="Courier">
  64.   <form method="post" action="histnick" name="formHist" onsubmit="return checkempty(event);">
  65.    user:<input type="text" name="user" size="20" maxlength="20" value="">&nbsp;&nbsp;&nbsp;&nbsp;<font size="1"><a href="setlng_ru"><font color="lightgray">ru</font></a>&nbsp;&nbsp;<a href="setlng_en"><font color="lightgray">en</font></a></font><br>
  66.    pass:<input type="password" name="password" size="20" maxlength="20" value="">
  67.    <br><hr><br>
  68.    nick:<input type="text" name="nick" size="20" maxlength="20" value="">
  69.    <input type="submit" value="go!">&nbsp;&nbsp;<font size="2"><a href="javascript:filteredClick()"><font color="#aaaaaa">flt</font></a>
  70.  
  71.   </font></form>
  72.  
  73. </font></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement