之前在jsp中写js或者引入js,有不少引入了没什么效果,和用HBuilder写的效果差了很多,花了不少时间弄,没有搞定,应该是自己的底子太差劲了,对jsp和js的理解不够深;今天学了Ajax发现不少的东西用Ajax写起来更方便些。我就简单的写一个小功能实现一下登录。
//这是登录界面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
//form表单
<form action="">
姓名:<input type="text" id="myinput" name="name" />
<span id="myspan"></span>
<br />
密码:<input type="password" id="mypwd" name="pwd