⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p412_error1.cgi

📁 javascript source code part2
💻 CGI
字号:
#!/usr/local/bin/sewse         //Unix-alike OS users only

function show_html()
{ 
  cgi.out("Content-Type: text/html \r \n");
  cgi.out("\r \n");

  cgi.out("<HTML>");
  cgi.out("<BODY>");

  \\ Uncomment one of the following two lines. Which depends on your OS
  \\ Top line for UNIX, bottom line for Windows
  \\ cgi.out("<FORM METHOD=\"POST\">");    
  \\ cgi.out("<FORM ACTION=\"http://myserver/cgi-bin/sewse.exe?error1.cgi\"
            METHOD=\"POST\">");  

  cgi.out("Enter surname ...");
  cgi.out("<INPUT TYPE=\"text\" NAME=\"surname\">");
  cgi.out("<INPUT TYPE=\"submit\">");
  cgi.out("</FORM>");
  cgi.out("</BODY>");
  cgi.out("</HTML>");
} 

// Create global variable
var surname;

// called without submit
function main ()
{ 
  if ( (surname = cgi.getVar("SURNAME"))== NULL || surname=="")
  { 
    show_html();
  } 
  else
  { 
    if ( surname.toUpperCase() == "SMITH"
       || surname.toUpperCase() == "WONG"
       || surname.toUpperCase() == "SINGH"
       || surname.toUpperCase() == "BROWN" )
    { 
      cgi.out("Content-Type: text/html \r \n");
      cgi.out("\r \n");

      cgi.out("<HTML>");
      cgi.out("<BODY>");
      cgi.out("Warning! Boring name alert!");
      cgi.out("</BODY>");
      cgi.out("</HTML>");
    } 
    else
    { 
      show_html();
    } 
  } 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -