在 url 中分离查询字符串参数的正确方法是什么? [英] What is the proper way to seperate query string parameters in a url?
问题描述
我需要测试一些正在传递几个全局参数的 XSLT,例如:
I need to test some XSLT that is being passed several global parameters so for example:
如果我有 2 个参数 displayNumber 和 pullDate 并且我的 URL 是 www.abcdefg.com/yyy/bbb.aspx(这里的第一个参数)(这里的第二个参数)
If I have 2 parameters displayNumber and pullDate and a my URL is www.abcdefg.com/yyy/bbb.aspx(first parameter here)(second parameter here)
如果我想为每个参数指定一个值,是否应该在两个参数之间放置一个字符?
If I then want to specify a value for each parameter, is there a character that should sit between the two parameters?
推荐答案
如果我想为每个参数指定一个值,是否有应该位于两个参数之间的字符?
If I then want to specify a value for each parameter, is there a character that should sit between the two parameters?
这与 XSLT 无关.
This has nothing to do with XSLT.
在 URL 中指定查询字符串参数的语法是众所周知的:
The syntax for specifying query-string parameters in a URL is well-known:
第一个名称-值对前面有一个问号
'?'
字符.
每个下一个名称-值对前面都有一个与号 '&'
字符.
Every next name-value pair is preceded by an ampersand '&'
character.
每个名称-值对都具有以下形式:name=value
Every name-value pair has the form: name=value
示例:
http://www.xyz.com/somePath?param1=value1¶m2=value2¶m3=value3
这篇关于在 url 中分离查询字符串参数的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!