[b]location.search=path_from_questionmark[/b]
location.search 是查询字符串。
eg.
http://www.w3schools.com/js/tryit.asp?filename=try_loc_search
location.search = ?filename=try_loc_search
[b]location.pathname=path[/b]
The pathname property sets or returns the path of the current URL.
eg.
http://www.w3schools.com/js/tryit.asp?filename=try_loc_pathname
location.path = js/tryit.asp
location.search 是查询字符串。
eg.
http://www.w3schools.com/js/tryit.asp?filename=try_loc_search
location.search = ?filename=try_loc_search
[b]location.pathname=path[/b]
The pathname property sets or returns the path of the current URL.
eg.
http://www.w3schools.com/js/tryit.asp?filename=try_loc_pathname
location.path = js/tryit.asp