This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10416|Reply: 0

[JavaScript] javascrip{filter}t removes the specified parameter in the URL and returns the URL

[Copy link]
Posted on 2/8/2017 10:08:57 AM | | |

I wrote a blog post before, "JavaScript Manipulation URLs in Search Part Method Functions". In this blog post, we can query various parameters in the URL through the written function, set. However, I forgot to delete it.

And today I encountered the problem of deleting a certain parameter. Depressed, so I wrote this function.

Implement the code


Function: Delete the parameters specified in the URL and return the full URL after deleting the parameters

How to use:

example

url: http//xx.com/list?page=1&a=5


funcUrlDel("page")

Returns http//xx.com/list?a=5

Other Notes:

The hash value will be ignored, and if necessary, you can add it yourself.





Previous:Java regex contest to select a beautiful number
Next:mvc identity filter ActionFilterAttribute is used
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com