How to add url parameter to the current url?

后端 未结 7 412
小鲜肉
小鲜肉 2020-12-08 06:49

Currently I\'m at

http://example.com/topic.php?id=14 

and I want to make a link to

http://example.com/topic.php?id=14&         


        
7条回答
  •  眼角桃花
    2020-12-08 07:14

    In case you want to add the URL parameter in JavaScript, see this answer. As suggested there, you can use the URLSeachParams API in modern browsers as follows:

    
    
    
    ...
      Like this page
    ...
    
    

提交回复
热议问题