<% Function strConv(strCommix,intState) Dim strChar Dim intAsc Dim strTmpIf intState = 0 Then For i = 1 To Len(strCommix) strChar = Mid(strCommix, i, 1) intAsc = Asc(strChar) If (intAsc>=-23648 And intAsc<=-23553) Then strTmp = strTmp & Chr(intAsc+23680) Else strTmp = strTmp & strChar End if Next Else For i = 1 To Len(strCommix) strChar = Mid(strCommix, i, 1) intAsc = Asc(strChar) If (intAsc>=32 And intAsc<=127) Then strTmp = strTmp & Chr(intAsc-23680) Else strTmp = strTmp & strChar End if Next End If strConv = Trim(strTmp) End Functionresponse.Write strConv("1,2,3,4",0) %>
Function strConv(strCommix,intState)
Dim strChar
Dim intAsc
Dim strTmpIf intState = 0 Then
For i = 1 To Len(strCommix)
strChar = Mid(strCommix, i, 1)
intAsc = Asc(strChar)
If (intAsc>=-23648 And intAsc<=-23553) Then
strTmp = strTmp & Chr(intAsc+23680)
Else
strTmp = strTmp & strChar
End if
Next
Else
For i = 1 To Len(strCommix)
strChar = Mid(strCommix, i, 1)
intAsc = Asc(strChar)
If (intAsc>=32 And intAsc<=127) Then
strTmp = strTmp & Chr(intAsc-23680)
Else
strTmp = strTmp & strChar
End if
Next
End If
strConv = Trim(strTmp)
End Functionresponse.Write strConv("1,2,3,4",0)
%>
1是半角转全角
如何将 textarea 本身的值放在字符串的位置???
http://hi.baidu.com/jkisjk/blog/item/c78d85d382393e063af3cf2f.html
page=clng(request("page"))
select case page
case 0
%>
<form action="workPlanAdd.asp" name="addFrm" id="addFrm" method="post">
<input type="hidden" name="page" value="1" />
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr height="25">
<td align="center" bgcolor="#000000" colspan="4"><B><font color="#FFFFFF">工 作 内 容</font></B></td>
</tr>
<tr><td height="3" colspan="4"></td></tr>
<tr>
<td width="643"><textarea name="a1" rows="3" cols="88" onblur=this.value=test(this.value)></textarea></td>
<td valign="bottom" align="left" width="55"><input type="checkbox" name="a2" value="0"> 待批 </td>
<td valign="bottom" align="left" width="50"><input type="checkbox" name="a3" value="0"> 隐藏 </td>
<td width=""></td>
</tr>
</table>
<input type="button" name="add_line" value=" 再增加下一行 " OnClick="AddFileInput()" />
<input type="submit" name="submit" value=" 保存我的工作计划内容 " />
</form>
<script language="VBScript">
NowFileInputNo = 1
NowFileInputCount = 0 Sub AddFileInput()
If NowFileInputCount < 15 Then
HTMLSrc = "<table Id=FileInput"& NowFileInputNo &"><tr><td><textarea rows=""3"" cols=""88"" name=""a1"" onkeyup=if(isNaN(this.value))this.value=''></textarea></td><td valign=bottom><input type=""checkbox"" name=""a2"" value="& NowFileInputNo &"> 待批 </td><td valign=bottom><input type=""checkbox"" name=""a3"" value="& NowFileInputNo &"> 隐藏 </td><td valign=bottom><input type=button value=删除 class=cbutton OnClick=""DelFileInput("& NowFileInputNo &")""></td></tr></table>"& vbcrlf
document.all.add_line.InsertAdjacentHTML "beforeBegin", HTMLSrc
NowFileInputNo = NowFileInputNo + 1
NowFileInputCount = NowFileInputCount + 1
Else
Alert "增加太多记录行"
End IF
End Sub Sub DelFileInput(tableno)
document.all("FileInput"& tableno).outerHTML = ""
NowFileInputCount = NowFileInputCount - 1
End Sub
</script>
<%
case 1
a1=request("a1")
a2=request("a2")
a3=request("a3")
SplitStra1=split(a1,",")
if a2<>"" then
SplitStra2=split(request("a2"),",")
end if
if a3<>"" then
SplitStra3=split(request("a3"),",")
end if
以下是保存入库
%>