如何获取 URL 参数 &Coldfusion的价值? [英] How Can I get the URL parameter & Value in Coldfusion?

查看:13
本文介绍了如何获取 URL 参数 &Coldfusion的价值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取 URL 参数 &Coldfusion的价值?例如:-

How Can I get the URL parameter & Value in Coldfusion? for Ex:-

我的网址是

test.cfm?par1=val1&par2=val2&par3=val3

是否可以直接获取第二个参数及其值?

Is it possible to get the second parameter and its value directly?

使用 <cfset param='#url.par2#'> 我可以得到 par2 的值,但我的参数是从其他页面动态生成并传递到这里(par2可能是下一次abc2,xyz2等..)所以我认为更好的方法是获取第二个位置的参数和值(位置不总是改变).

with <cfset param='#url.par2#'> I can get value of par2, But my parameters are dynamicically generated from other page and passed to here (par2 may be next time abc2,xyz2 etc..) So I think better way is to get the parameter and Value in 2nd Possition(Possition dont change always).

任何想法我怎样才能得到它?

Any Idea How can I get it ?

提前致谢

推荐答案

   <cfset Param2 = ListGetAt(CGI.QUERY_STRING,2,"&")>

这篇关于如何获取 URL 参数 &amp;Coldfusion的价值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆