Home > Backend Development > PHP Tutorial > Live search cannot use the syntax of this page to retrieve data into a div?

Live search cannot use the syntax of this page to retrieve data into a div?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-10-11 14:23:30
Original
1600 people have browsed it

I have done a live search (assuming search.php) and it will retrieve the data to page a
If there is matching data, it will be printed into the div of page a
The problem is here

Because my search.php will have some jquery operations such as data- and $.ajax, etc., which can edit and update the data
So I have added these plug-ins to the a page
For example<script src="http ://code.jquery.com/jquery-1.10.2.min.js"></script>
and the jquery.js plug-in syntax at the bottom of the page (put data- and $.ajax, etc. etc)

When the data reaches the div of page a, I operate the jquery syntax on it but it doesn’t work at all!

So I added a plug-in to search.php<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> and my own jquery .js
can be used, but when updating the data, the field values ​​will be completely cleared, that is, after pressing save, the field values ​​will become empty....
But when I enter search.php alone (not on page a) Update data and other operations
The operation is completely normal! It’s completely possible to save data and so on, no problem

So I don’t quite understand how to explain this?
It means that search.php is a completely independent page. Any syntax on page A is completely unavailable

But I am printing to page a...
Then if it is a completely independent page, adding syntax to search.php will be weird (the field value will become empty)!

Reply content:

I have done a live search (assuming search.php) and it will retrieve the data to page a
If there is matching data, it will be printed into the div of page a
The problem is here

Because my search.php will have some jquery operations such as data- and $.ajax, etc., which can edit and update the data
So I have added these plug-ins to the a page
For example<script src="http ://code.jquery.com/jquery-1.10.2.min.js"></script>
and the jquery.js plug-in syntax at the bottom of the page (put data- and $.ajax, etc. etc)

When the data reaches the div of page a, I operate the jquery syntax on it but it doesn’t work at all!

So I added a plug-in to search.php<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> and my own jquery .js
can be used, but when updating the data, the field values ​​will be completely cleared, that is, after pressing save, the field values ​​will become empty....
But when I enter search.php alone (not on page a) Update data and other operations
The operation is completely normal! It’s completely possible to save data and so on, no problem

So I don’t quite understand how to explain this?
It means that search.php is a completely independent page. Any syntax on page A is completely unavailable

But I am printing to page a...
Then if it is a completely independent page, adding syntax to search.php will be weird (the field value will become empty)!

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template