日期:2014-05-17 浏览次数:20789 次
<!-- #include file="conn.asp"--> <title></title> <body scroll="no" marginwidth="0" leftmargin="0" topmargin="0"> <% Function codeTextarea(Byval str,Byval enType) if isNul(str) then codeTextarea = "" : Exit Function select case enType case "en" codeTextarea = replace(replace(str,chr(13)&chr(10),"<br>"),chr(32)," ") case "de" codeTextarea = replace(replace(str,"<br>",chr(13)&chr(10))," ",chr(32)) end select End Function dim sql Set cmdTemp = Server.CreateObject("ADODB.Command") Set InsertCursor = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "SELECT top 1 * FROM bao order by id desc" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn InsertCursor.Open cmdTemp, , 1, 3 InsertCursor.addnew if carsortstr<>"" then InsertCursor("carsort")=carsortstr end if if Server.HTMLEncode(Request("month"))<>"" then InsertCursor("month")=codeTextarea(Request("month"),"en")''''''''''' end if if Server.HTMLEncode(Request("day"))<>"" then InsertCursor("day")=codeTextarea(Request("day"),"en") end if if Server.HTMLEncode(Request("explain"))<>"" then InsertCursor("explain") =codeTextarea(Request("explain"),"en")'''''' end if InsertCursor.Update ' response.write InsertCursor("id") ' response.End ' InsertCursor.movelast %> <script language=Javascript> <!-- alert("您已成功登记相关信息!"); window.location="nee.asp" --> </script> <% InsertCursor.close conn.close set InsertCursor=nothing set conn=nothing %>
------解决方案--------------------
试了一下,输出还是空格,看了一下数据库,里面还是以换行的形式存储在里面,
可能不是换符号的问题吧