Home > Web Front-end > JS Tutorial > It turns out that the Jquery.load method can keep loading_jquery

It turns out that the Jquery.load method can keep loading_jquery

WBOY
Release: 2016-05-16 18:09:00
Original
1000 people have browsed it

As long as there is no conflict (for example, the ID cannot be the same), I wrote an example to use page parameters to control the internal element ID and load each other. This is a jsp page, the code is as follows:

Copy code The code is as follows:

<% @ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() "://"
request.getServerName() ":" request.getServerPort()
path "/";
int i = Integer.parseInt(request.getParameter("i ")==null?"0":request.getParameter("i"));
%>




User login


< ;meta http-equiv="expires" content="0">






this is index.jsp ?i=<%= i %>



load index.jsp?i =<%= i 1 %> here!




After running, as shown in the picture, you can keep clicking:

However, if you only take part of the page, for example, change the click code of the button to:

Copy the code The code is as follows:

$("#d<%= i %>").load("<%=basePath%>Login.action input",{i:<% =i 1%>});

Then, only a button is loaded, not the entire page. As shown in the picture:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template