javascript - Big discussion on url get parameters, find out type=iphone&color=white&order=1

WBOY
Release: 2016-08-18 09:15:57
Original
1034 people have browsed it

1. I clicked on the Apple tab to display the iphone page,
2. On the displayed iphone page, I clicked on the color=white tab, and after filtering, I got white apples
3. Then I clicked on the time to sort the products. It will be sorted by release time!

Question: How do I append index.php?type=iphone&color=white; to the current index.php?type=iphone?

Then add order=desc, the result is index.php?type=iphone&color=white&order=desc

Reply content:

1. I clicked on the Apple tab to display the iphone page,
2. On the displayed iphone page, I clicked on the color=white tab, and after filtering, I got white apples
3. Then I clicked on the time to sort the products. It will be sorted by release time!

Question: How do I append index.php?type=iphone&color=white; to the current index.php?type=iphone?

Then add order=desc, the result is index.php?type=iphone&color=white&order=desc

What’s there to say about this question? .

If you do this, you can send multiple requests and filter them once each time

URI.js
The above is the URI library of JS, which is specially used for URL operations.

Actually, I thought about it. You don’t need to append the original poster’s operation. You can just regenerate a new URL, because when you click on an operation, your operation status will definitely be recorded.
If the poster must add something, he can first determine the parameter value in the URL and replace it.

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!