Loading data from the scroll drop-down to the bottom of the page is the practice of many waterfall stream websites. Let's take a look at how jsonp is implemented. You can use the summary record of the dishes.
Of course, this example uses the jquery
I. load () method (simplest)
Load (url, [data], [callback])
Url: the address of the loaded page.
Data: Optional. data sent to the server. The format is key/value.
Callback: optional, callback function
1. The simplest application
Copy codeThe Code is
The effect is roughly as follows:
Javascript uses jquery. Create an Asp.net web project and use NuGet to obtain the latest Jquery version.
The database uses Nhibernate and the Install-Package Nhibernate reference.
The database uses PostgreSQL.
We are all very familiar with tables. Today's CSS makes the layout of tables more and more brilliant. However, in any case, it cannot conceal the rigidity of those packages.
So how can we make those rigid data more readable and available, and make
Default. aspx
Copy codeThe Code is as follows:
No title page Number: Name:
Default. aspx. csCopy codeThe Code is as follows: using System;Using System. Data;Using System. Configuration;Using System. Web;Using System. Web. Security;Using
Paging Homepage
Copy codeThe Code is as follows:
pagination of martial arts novels
jquery implementation $. ajax pagination ID name author press ISBN number > type price
Paging php essential code
Copy codeThe Code is as
For practice purposes, ajax is required to obtain the values in the List set in the background. I have never touched on it before, so I will study it today.
1. Download the jar package dependent on JSON. It depends mainly on the
Page script:
Copy codeThe Code is as follows: function ajaxSave (URLS ){
// Define a variable to store the XMLHttpRequest object
Var xmlhttp;
// Define a variable to store the response results returned from the server
Var responseContext = "";
If
Copy codeThe Code is as follows:
Copy codeThe Code is as follows: // The data part to be updated, such as a Repeater, including the paging control;
Copy codeThe Code is as follows: // register the page as Ajax in the backgroundAjaxPro. Utility.
Document directory
Demo-click the search button below to search for Data
In the web development process, we often need to enter keywords on the front-end page for data search. We usually use the search method to display the search results on
If you use get in IE7 or earlier requests, the URL restriction is easily overlooked (up to 2083 characters ). Therefore, if the URL may be too long, POST must be
Index. jsp:
Copy codeThe Code is as follows:
second-level menu linkage demonstration
Second-level linkage example
Select
Beijing
Tianjin
Shandong Province
Select
SelectServlet:Copy codeThe Code is as
Original Project address: http://plugins.jquery.com/project/pagination
Version: v1.2
Source File Download: English original version or Chinese translation modified version
I. Related demo
Basic demo page
Ajax demo page
Parameter editable demo
In JQuery, AJAX has three implementation methods: $. ajax (), $. post, $. get ().
First, let's look at $. get ():
Copy codeThe Code is as follows: $. get ("test. jsp ",
{Name: "cssrain", time: "2008/01/21"}, // data to be transmitted
Function (data )
The Ajax framework provides a set of modular Ajax functions. The Ajax framework can be implemented in various languages (for example, SAJAX has implementation in various languages). Ajax is only part of jquery,
Instance 1Copy codeThe Code is as
Cache problems:
What is cache problems? That is, when the input content of the browser is the same, that is, the requested URL is the same, the browser will read the cache, and the content of the two requests will not interact with the
I. js script cache Problems
A: This is one of the most common problems you have encountered, because when you modify the js content for debuggingThe result of the newly written code cannot be displayed because the current page uses cache
$. Get () and $. post () methods are basically the same, so only $. post () is used!
Scenario 1: $. post ("url", function); The returned data is not processed, so it is not in json format!
Scenario 2: $. post ("url", function, "json"); although
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service