如何从.aspx页访问XSL的隐藏字段 [英] how to access hidden fields of XSL from .aspx page

查看:59
本文介绍了如何从.aspx页访问XSL的隐藏字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个像
这样的隐藏字段

I have an hidden field like

<input type="hidden" id="HdnTbl" value="tblHead"  runat="server" />

推荐答案

XSL是样式表.因此,它不是aspx的一部分,当不在页面内运行它时,我看不到如何访问"它.如果它在您的aspx中,则可以使用名称来访问它,前提是您拥有runat ="server".
An XSL is a stylesheet. As such, it''s not part of your aspx, and I don''t see how you can ''access'' it when it''s not being run inside your page. If it was in your aspx, then you could access it by name, given that you have runat="server".


如果您在JavaScript中需要它,请执行
If you need it in JavaScript do
document.getElementById('HdnTbl')

,或者如果您使用的是jQuery,则可以执行

or if you are using jQuery you can do


(" #HdnTbl")


这篇关于如何从.aspx页访问XSL的隐藏字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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