从厚箱控制中获取价值

Muh*_*tar 3 javascript asp.net jquery thickbox

我在厚盒子上隐藏了字段,当我关闭厚度时我需要获取隐藏字段的值,当关闭厚盒子时此方法调用

function tb_remove(parent_func_callback) {
parent.document.getElementById('hdf').value// I need value of hidden field here
Run Code Online (Sandbox Code Playgroud)

请告诉我如何获得厚盒子上的隐藏字段值?

例如,我有页面abc,我点击页面abc上的heyperlink,然后页面xyz打开作为厚盒子,在xyz thickbox上我有隐藏字段名称hdf,现在我点击厚盒子的关闭按钮,tb_remove被称为thickbox.js文件,我需要在js文件中获取hdf的值,以便在abc页面中使用.

谢谢

Gab*_*abe 5

好吧,如果我正确理解了这个问题,'hdf'就是隐藏字段的ID,所以这会让你获得价值......如果我误解了,请告诉我.

我假设你用厚盒子意味着你想在iframe中获得一个控件或类似的东西......这就是如何.

var hdfVal = $('#myIFrameID').contents().find('#hdf').val();
Run Code Online (Sandbox Code Playgroud)

或者简单地说,只需要通过ID获取控件的值...

var hdfVal = $('#hdf').val();
Run Code Online (Sandbox Code Playgroud)