日期:2014-05-16 浏览次数:20427 次
<button id="usernameCheck" type="button" onclick="eventHandler(event);">CHECK</button> <!-- requestSrc=2 -->
function eventHandler(eventSrc) {
eventSrc=eventSrc || window.event;
var target=eventSrc.target || eventSrc.srcElemnt;
switch(target.getAttribute("id")) {
case "usernameCheck":
if(elementValidation(document.getElementById("username"))){
var username=document.getElementById("username").value;
this.location="../action/ActionController?requestSrc=2&username="+username;
}
break;
default:
break;
}
}
request.getRequestDispatcher("register.jsp").forward(request, response);