
想用一个文本框中是否有内容来控制button的可点击性,请提供代码,谢谢!
<inputname="complexselected"type="text"id="complexselected"value=""maxlength="50"size...
<input name="complexselected" type="text" id="complexselected" value="" maxlength="50" size="70"/>
<input name="complexselectedbutton" type="button" value="确定" onclick=""/>
期望效果:文本框中有内容时后面的按钮才可以点击。 展开
<input name="complexselectedbutton" type="button" value="确定" onclick=""/>
期望效果:文本框中有内容时后面的按钮才可以点击。 展开
1个回答
展开全部
你可以在burron的onclick事件里面添加判断文本框是否有内容的代码,比如:
if(complexselected.value.length==0)
if(complexselected.value.length==0)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询