asp 设置 文本框的 宽度 为更宽。

来源:百度知道 编辑:UC知道 时间:2024/06/06 14:15:00
我有一段asp代码,是问卷题,选项中有一个是radio选项后面,可以给被调查者填写文字,下面这段代码,请问如果设置文本框的宽度为45或更宽。

surveyQuestionList=surveyQuestionList & "<li><input type=""radio"" name=""answer"&Survey_question(i)&""" value="""&ubound(Question_answer)&""">"&Question_answer(ubound(Question_answer))&"<input type=""text"" name=""answer"&Survey_question(i)&"_2""></li>"
else

给input 设置样式 class="mywidth"
然后在css里定义
.mywidth {
width:45px;
}
就可以了

文本框的宽度为45或更宽: style='minwidth:45px'

size='10' maxlength='5' value="""&ubound(Question_answer)&""">"&Question_answer(ubound(Question_answer else

按上面的修改吧,size是总长度,maxlength是允许输入的字符长度。

Question_answer(ubound(Question_answer))&"<input type=""text"" name=""answer"&Survey_question(i)&"_2""></li>"

加点宽度设置
Question_answer(ubound(Question_answer))&"<input type=""text"" size ="30" name=""answer"&Survey_question(i)&"_2""></li>"