当前位置: 代码迷 >> Java Web开发 >> 怎么显示带空格的字符串
  详细解决方案

怎么显示带空格的字符串

热度:10   发布时间:2016-04-17 15:41:53.0
如何显示带空格的字符串?
strTitle= "hello   world "
<input   name= "description "   type= "text "   size= "80 "   maxlength= "256 "   value= <%=strTitle%>   />
显示出来的只有 "hello "
请问怎样解码才能显示完整的字符串

------解决方案--------------------
<input name= "description " type= "text " size= "80 " maxlength= "256 " value= " <%=strTitle%> " />

------解决方案--------------------
<input name= "description " type= "text " size= "80 " maxlength= "256 " value= " <%=strTitle%> " />
在值的两边加上双引号就可以了.
------解决方案--------------------
呵呵,只要在两边加上引号就OK了
  相关解决方案