Hello teacher, what does the question mark mean? And the following ?pid="+pid
Time
Time 2019-02-21 15:43:14
0
3
1762

Hello teacher, what do the question marks after html and pid = pid mean?

window.location.href="suorg/index.html?pid=" pid

Time
Time

你想拥有你从未有过的东西 ,那么你必须去做你从未做过的事情。

reply all(1)
Ennio

href itself is a hypertext and a special string, so a string needs to be constructed. However, if the HTML statement is not placed in <prepare></prepare>, the spaces in the middle will be ignored. Equivalent to suorg/index.html?pid= If you replace the question mark with a space, the browser will ignore the space, so the link will be incorrect. You need to use a question mark to replace the space, or use &nbsp instead.

The +pid behind it means that the value of the pid variable is regarded as a string and concatenated with the previous string to form a link, which is equivalent to linking to the specified website and passing in a default value.

Beginners, although this is a simple question, I may be wrong or not rigorous in some places, please discuss more, hahaha

  • reply Thank you very much for your answer! Thanks
    Time author 2019-02-22 10:27:35
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template