简体   繁体   English

我需要传递期望的参数。 标记文件,使用javascript

[英]I need to pass a parameter expected by a . tag file, using javascript

I have a .tag file that renders an HTML output but it expects an attribute. 我有一个呈现HTML输出的.tag文件,但它需要一个属性。 I need to pass the required data to that tag file using a javascript file. 我需要使用javascript文件将所需数据传递到该标记文件。 Is there a way to do that? 有没有办法做到这一点?

.tag文件只是Servlet(它们在服务器上运行),因此您必须将值从JS传递到.tag的唯一方法是启动一个将这些值传递给包含.tag的jsp的请求,并通过请求对象,例如: ${requestScope.myParam}

No you can't. 不,你不能。 I wish it was that easy. 我希望那是那么容易。 You probably want to pass a client property to the tag (which reside on de server) but that's not going to work.. 您可能想要将客户端属性传递给标记(位于服务器上),但这将无法正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 需要在我使用 javascript 添加到我的页面的按钮的 onclick 事件上传递参数 - Need to pass a parameter on the onclick event of a button I add to my page using javascript 将参数传递到 javascript 文件中 - pass a parameter into a javascript file 如何在使用标签将文件包含在jsp中时传递参数 - how to pass parameter while including file in jsp using tag 我正在使用 cakephp 2.x,我需要将数据从特定控制器传递到 javascript 文件 - I'm using cakephp 2.x, I need to pass data from a specific controller to a javascript file Ruby On Rails-使用require.js时,我需要一个JavaScript文件来通过ruby - Ruby On Rails - I need a javascript file to pass though ruby when using require.js 需要将参数和事件信息传递到javascript函数中 - Need to pass parameter and event information into javascript function 如何在不使用参数的情况下在javascript中传递变量? - How can I pass variable in javascript without using parameter? 我如何使用Javascript传递php参数 - how do i pass the php parameter using Javascript 使用Javascript SDK时需要传递访问令牌吗? - Do I need to pass access tokens when using the Javascript SDK? 尝试将参数从php文件和标签传递到脚本标签 - Trying to pass a parameter from php file and tag to script tag
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM