Relative URL to a different port number in a hyperlink?

前端 未结 11 1878
心在旅途
心在旅途 2020-11-27 15:13

Is there a way without Javascript / server-side scripting to link to a different port number on the same box, if I don\'t know the hostname?

e.g.:

&l         


        
11条回答
  •  我在风中等你
    2020-11-27 16:11

    How about these:

    Modify the port number on click:

    Look at another port
    

    However, if you hover your mouse over the link, it doesn't show the link with new port number included. It's not until you click on it that it adds the port number. Also, if the user right-clicks on the link and does "Copy Link Location", they get the unmodified URL without the port number. So this isn't ideal.

    Here is a method to change the URL just after the page loads, so hovering over the link or doing "Copy Link Location" will get the updated URL with the port number:

    
    
    
    
    
    
    Look at another port
    
    
    

提交回复
热议问题