///////////////////////////////////////////////////
我只能写到下拉框选择的时候页面有变化,可是现在我想页面刚进去的时候就让一个ID是1的不显示,选择下拉框以后才显示,搞来搞去弄不好,请教高手了,解决了马上给分
def prn
parts = < <EOF
<script>
function hide(Index) {
if (Index == "亏损 ") {
document.getElementById( "1 ").style.display = " "
} else {
document.getElementById( "1 ").style.display = "none "
}
}
</script>
EOF
sel_part = SelectNode.new(@name,@title,@val,@lis,@size)
action_type = set_action( "#{@state} ", "TypeChange ", "#{@agrv} ", "#{@state} ")
script = "onchange = \ "hide(this.value)\ " "
sel_part.set_script(script)
parts += sel_part.prn
return parts
end
------解决方案--------------------
帮 up
------解决方案--------------------
学习中。