Full angle English to half angle

Source: Internet
Author: User
Tags chr lowercase
<title> convert full angle to half angle, half angle to full angle </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">

<body bgcolor= "#FFFFFF" >

<%
'---------------------------------------
' Writing: Johnsun email:zjs@dagongbao.com
' Language: Asp+vbscript please keep the copyright note
' Direction: "1" uppercase to lowercase; "-1" lowercase to uppercase
'---------------------------------------

Dim contenta,contentb
Contenta=request.form ("Contenta")
If contenta<> "" Then
Call Contentstr (Contenta, "1")
End If
Contentb=request.form ("Contentb")
If contentb<> "" Then
Call Contentstr (CONTENTB, "-1")
End If

function Contentstr (content,direction)
Dim Strbig,tstrbig,strsma,tstrsma
strbig= "Abcdefghijklmnopqrstuvwxyz '"
tstrbig= "Abcdefghijklmnopqrstuvwxyz '"
Strsma= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Tstrsma= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Dim b, TB (%), S (), TS (25)
For I=1 to 26
B (i-1) =mid (strbig,i,1)
TB (i-1) =mid (tstrbig,i,1)
If direction= "1" Then
Content=replace (Content,b (i-1), TB (i-1))
ElseIf direction= "-1" Then
Content=replace (CONTENT,TB (i-1), B (i-1))
End If
S (i-1) =mid (strsma,i,1)
TS (i-1) =mid (tstrsma,i,1)
If direction= "1" Then
Content=replace (Content,s (i-1), TS (i-1))
ElseIf direction= "-1" Then
Content=replace (Content,ts (i-1), S (i-1))
End If
Next
'-------------------------------------------
Content=replace (CONTENT,CHR) &AMP;CHR (a), "<br>"
If direction= "1" Then
Content=replace (Content, "", "")
Else
Content=replace (Content, "", "")
End If
'-------------------------------------------
Contentstr=content
If direction= "1" Then
Response.Write "Uppercase to lowercase:<br>"
Else
Response.Write "Lowercase to uppercase:<br>"
End If
Response.Write Contentstr & "<BR>"
End Function
%>
<form action= ' d.asp ' method= ' post ' >
Uppercase to lowercase:
<textarea name= "Contenta" rows= "8" cols= ">"
A lady said to her friend, the Sun is the most beautiful and useful body.
A Gentlman answered: "Yes,madam,the Sun is a very fine body,but with my opinion,it isn't so useful as the moom."
"Why?" "asked the lady.
"Because," replied the Gentleman, "the Moon affords us light in the might-time,when we really want it,whereas we have the SU n always with us in the day-time,when we have is so much meed of it. </textarea>
<br>
lowercase to uppercase:
<textarea name= "CONTENTB" rows= "8" cols= ">"
Arctic Explorer Boy:dad,when I grow up I want to being an Arctic explorer.
Father:that ' s Fine,bill.
Boy:but I want into the training at once.
Father:and so?
Boy:well,i want a dollar a day for Ice-cream so I ' ll get used to the cold.
</textarea>
<br>
<input type= "Submit" name= "submit" value= "Submit" >
</form>
</body>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.