日期:2014-05-16  浏览次数:20481 次

js和接jsp判断值是否是undefined的方法
1、JS
if (typeof (lastBookID) == "undefined") {
							alert("undefined---");
						}



1、JSP
<%
	String bookId = request.getParameter("bookId");
	if (null != bookId && !"undefined".equalsIgnoreCase(bookId)) {
		session.setAttribute("bookId", bookId);
	}
%>