<pre>数据库内容……</pre>

解决方案 »

  1.   

    在textarea中显示应该是一样的
      

  2.   

    如何用pre啊 ,请在说仔细点啊,小第是刚学js啊,
      

  3.   

    呵呵,如果你是从TextArea中输入到数据库中,然后再从数据库中输出到TextArea中的话,你根本就不用做什么,输出就和输入是一模一样的了<pre></pre>标签是用来在页面上按原样显示输入的字符的并不能用在TextArea中
      

  4.   

    文章输入的时候用:
    <textarea name="content" cols="95" rows="20" wrap="hard">
    wrap=hard 会自动帮你换行的
    自己调整相应的宽
    读的时候用<pre>content</pre>
    我的就是这么解决的
      

  5.   

    提交到的时候,对数据进行格式化.用函数格式化.<%
    function htmlencode2(str)
        dim result
        dim l
        if isNULL(str) then 
           htmlencode2=""
           exit function
        end if
        l=len(str)
        result=""
    dim i
    for i = 1 to l
        select case mid(str,i,1)
               case "<"
                    result=result+"&lt;"
               case ">"
                    result=result+"&gt;"
                  case chr(13)
                    result=result+"<br>"
               case chr(34)
                    result=result+"&quot;"
               case "&"
                    result=result+"&amp;"
                  case chr(32)            
                    'result=result+"&nbsp;"
                    if i+1<=l and i-1>0 then
                       if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9)  then                       
                          result=result+"&nbsp;"
                       else
                          result=result+" "
                       end if
                    else
                       result=result+"&nbsp;"                     
                    end if
               case chr(9)
                    result=result+"    "
               case else
                    result=result+mid(str,i,1)
             end select
           next 
           htmlencode2=result
       end function
    %><%
    rs("content") = htmlencode2(Request.Form("content"))
    %>
      

  6.   

    <textarea>第一行&#13;&#10;第二行</textarea>
      

  7.   

    <head>
    <style>
    .textareaWidthoutBorder
    {
    height : expression(this.scrollHeight);
    border : 0;
    background-color : transparent;
    overflow : hidden;
    }</style></head><body bgcolor=efefef>
    <textarea class=textareaWidthoutBorder >将内容忠实显示
    与Pre的区别是内容过多,则会自动折行
    fdsafdas
    fdsaf
    sdafdsa
    fdsa</textarea> 
    </body>
      

  8.   

    rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
      

  9.   

    说说说说说说说说说说说说说说说说说说说说说说说说rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr