Home  >  Article  >  Web Front-end  >  The solution to the problem of sending two requests after easyui's datagrid component page is loaded

The solution to the problem of sending two requests after easyui's datagrid component page is loaded

巴扎黑
巴扎黑Original
2017-07-24 14:49:301958browse
Problem description:

Using easyui's datagrid component, two requests are sent to the server after the page is loaded. The first request does not have parameters, the server reports a null pointer exception, and the second time is normal.

Reason:

The easyui-datagrid is declared using class in the html code. When loading the page, easyui first parses the datagrid, requests the URL once, and then calls the js code to initialize the datagrid to request the URL once, resulting in duplication. Loading.

Solution:

Delete the redundant class = 'easyui-datagrid'


The above is the detailed content of The solution to the problem of sending two requests after easyui's datagrid component page is loaded. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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