日期:2014-05-18  浏览次数:20844 次

关于html:form...focus的问题
为什么控件是nested:text开头,焦点就置不上去,有什么解决办法吗?前提是用html:form的focus
<html:form   method= "post "   focus= "TXT_NAME ">
<nested:text   property= "TXT_NAME "   maxlength= "8 "   tabindex= "1 "   size= "40 "   />
而html:text开头,焦点就能置上去
<html:form   method= "post "   focus= "TXT_NAME ">
<html:text   property= "TXT_NAME "   maxlength= "8 "   tabindex= "1 "   size= "40 "   />

------解决方案--------------------
不懂 帮你顶
------解决方案--------------------
不用html:form的focus的话,可以用下面的方法试试:
<script language= "Javascript ">
function setFocus(){
document.getElementById( "TXT_NAME ").focus();
}
</script>

<body onload= "setFocus(); ">
<nested:text property= "TXT_NAME " maxlength= "8 " tabindex= "1 " size= "40 " />