【发布时间】:2011-12-02 13:07:15
【问题描述】:
仍在尝试解析 this xml:
我想用这段代码获取 param 标签的 z_depth 值
$(sif).find('layer[type="import"] param[name="z_depth"] real').each(function(){
zdepth_value = $(this).attr('value');
});
并使用以下代码在 css 属性中打印:
$('<div style="position:relative; width:100%; height:100%; z-index:'+zdepth_value+'"></div>').appendTo('#object');
但是我没有得到属性值
我把代码放在: jsfidle
【问题讨论】: