Hello teacher, what do the question marks after html and pid = pid mean?
window.location.href="suorg/index.html?pid=" pid
Ennio2019-02-21 22:10:39
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   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