Let's talk about JSP and JavaScript for use and interviews. Maybe you have used Delphi's WebBroker to develop Web Application When you do one thing (submit) is a WebAction, it is a function. And this function has become a page under ASP and JSP conditions. However, you should also understand them into a function, a function that returns a string. And this string is that you use the results you see by the View Source File menu command. In this way, the issue of JavaScript call Java variables is solved. The string returned by our JSP has a JavaScript code, and these code is performed by the browser. Since the generation of JavaScript code can be dynamically generated by JSP, JavaScript can contain JSP code running results. This enables JavaScript calls to JSP variables. Let's take a look later, JavaScript calls to JSP methods and JSP to JavaScript. These two calls have a common point, which is to submit the page, and set several hidden parameters with Hidden. JSP can be processed according to the corresponding parameters, it is possible. Maybe some people have not understood, then we still use a program to explain the problem! Procedure 2: A server gets a web page for client information. He obtained some screen settings of the client and record them in the database. GetClientInfo.jsp
<% @ page contenttype = "text / html; charset = uTF-8" Language = "java"%>
<% @ import = "java.sql. *"%>
Table, Body {
Font-Family: "Courier New";
FONT-SIZE: 10PT;
}
Style>
HEAD>
<%
IF (Request.GetParameter ("ishavedata") == null) {%>