S? d?ng H�m UCASE() v� LCASE()

H�m UCASE() d�ng ?? chuy?n t?t c? c�c k� t? trong m?t chu?i th�nh ch? HOA.


H�m UCASE()

H�m UCASE() d�ng ?? chuy?n t?t c? c�c k� t? trong m?t chu?i th�nh ch? HOA (UPPERCASE). C�c k� t? kh�ng thu?c b?ng ch? c�i s? ???c gi? nguy�n v� cho ra k?t qu? t??ng t?. Ta c� th? vi?t UCASE() hay UCase()

V� D? 1:

<%

Response.Write("this is an example 1")

%>

K?t qu?:
this is an example 1

V� D? 2:

<%

Response.Write UCASE("this is an example 1")

%>

K?t qu?:

THIS IS AN EXAMPLE 1

V� D? 3:

<%

Response.Write UCASE("<b>this is an example 1</b>")

%>

K?t qu?:

THIS IS AN EXAMPLE 1

V� D? 4:

<%

Dim strExample
strExample = "this is an example 1"
Response.Write("" & UCASE(strExample) & "")

%>

K?t qu?:

THIS IS AN EXAMPLE 1

V� D? 5:

<%

Dim strExample
strExample = "this is an example 1"

Response.Write("<b>" & UCASE(strExample) & "</b>")

%>

K?t qu?:

THIS IS AN EXAMPLE 1

H�m LCASE()

H�m LCASE() d�ng ?? chuy?n t?t c? c�c k� t? trong m?t chu?i th�nh ch? th??ng(LOWERCASE). C�c k� t? kh�ng thu?c b?ng ch? c�i s? ???c gi? nguy�n v� cho ra k?t qu? t??ng t?. Ta c� th? vi?t LCASE() hay LCase()


V� D? 1:

<%

Response.Write LCASE("This Is An Example 2")

%>

K?t qu?:

this is an example 2


V� D? 2:

<%

Dim strExample
strExample = "THIS IS AN EXAMPLE 2"

Response.Write("<b>" & LCASE(strExample) & "</b>")

%>

K?t qu?:

this is an example 2




This entry was posted on 02:37 and is filed under , .Follow any comments here with the RSS 2.0 . You can leave a response so that we can know your suggestion.
0 Responses to "S? d?ng H�m UCASE() v� LCASE()"

Đăng nhận xét