![]() |
1
1
这取决于是否要考虑查询参数和/或哈希。
相对/绝对值不是问题,请使用
anchor element
的
interface mixin HTMLHyperlinkElementUtils { [CEReactions] stringifier attribute USVString href; readonly attribute USVString origin; [CEReactions] attribute USVString protocol; [CEReactions] attribute USVString username; [CEReactions] attribute USVString password; [CEReactions] attribute USVString host; [CEReactions] attribute USVString hostname; [CEReactions] attribute USVString port; [CEReactions] attribute USVString pathname; [CEReactions] attribute USVString search; [CEReactions] attribute USVString hash; }; 如果希望包含查询参数和哈希,则
请记住,查询参数顺序可能很重要。它经常
重要,在这种情况下,对于“等效”URL,如
|