課程引言課後作業1
阿新 • • 發佈:2017-06-08
課堂 png turn win exit erp == user 應用服務器
1.網站系統開發需要掌握的技術。
Java語言、環境配置、網頁腳本語言、數據庫、應用服務器。
2.課堂測試源代碼。
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript"> function login(){ var username=document.getElementById("username").value; var password=document.getElementById("password").value; if(username==""||username==null){ document.getElementById("umess").innerHTML="username is null"; return; } if(password==""||password==null){ document.getElementById("pmess").innerHTML="password is null"; return; } if(username=="admin"&&password=="admin"){ alert(username+"success"); window.open("loginsuccess.html"); }else{ alert("error"); } } function exit(){ window.close(); } </script> </head> <body> <div> <form action="" method="post"> <table border=1 align="center"> <tr align="center"><td colspan="3">login</td></tr> <tr> <td>username:</td><td><input type="text" id="username" name="username"/></td><td id="umess"></td> </tr> <tr> <td>password:</td><td><input type="password" id="password" name="password"/></td><td id="pmess"></td> </tr> <tr align="center"> <td colspan="3"> <input type="button" value="login" onclick="login();"/> <input type="button" value="cancel" onclick="exit();"/> </td> </tr> </table> </form> </div> </body> </html>
3.截圖
課程引言課後作業1