ACTIVE SERVER PAGE > sub ~ end sub ¿¹Á¦ - asp¿¡¼ javascript ó¸®
µî·ÏÀÏ : 2017-07-03 20:21
Á¶È¸¼ö : 58,794
ASP ÇÁ·Î±×·¡¹ÖÀ» ÇÏ´Ù º¸¸é ÀÚ¹Ù½ºÅ©¸³Æ® alert ó¸®ÇÏ´Â ºÎºÐ¶§¹®¿¡ ½Ã°£À» ³¶ºñÇÏ´Â °æ¿ì°¡ ¸¹½À´Ï´Ù.
ÀÌ·² °æ¿ì ¸Þ¼¼Áö¸¸ Àü´ÞÇؼ alert À» »ç¿ëÇϸé ÇÁ·Î±×·¡¹Ö ½Ã°£À» ´ÜÃàÇÒ¼ö ÀÖ½À´Ï´Ù.
¾Æ·¡ ¼Ò½º 󷳿ä.
'-----------------ALERT Ç¥½Ã ---------------------------
sub Alert(txtmsg)
txtmsg = replace(txtmsg, "'", "`")
response.write "<script language='javascript'>"
response.write "alert('" & txtmsg & "');"
response.write "</script>"
end sub
'-----------------ALERT Ç¥½Ã ÈÄ µÚ·Î À̵¿---------------
sub Alert_back(txtmsg)
txtmsg = replace(txtmsg, "'", "`")
response.write "<script language='javascript'>"
response.write "alert('" & txtmsg & "');"
response.write "history.back ();"
response.write "</script>"
response.end
end sub
'-----------------ALERT Ç¥½Ã ÈÄ Æ¯Á¤ URL ·Î À̵¿-----------------
sub Alert_url(txtmsg, txturl)
txtmsg = replace(txtmsg, "'", "`")
response.write "<script language='javascript'>"
response.write "alert('" & txtmsg & "');"
response.write "window.location.replace ('" & txturl & "');"
response.write "</script>"
response.end
end sub
'-----------------ALERT Ç¥½Ã¾øÀÌ ÀüüÀ©µµ¿ì¿¡ ´ëÇÑ Æ¯Á¤ URL ·Î À̵¿(ÇÁ·¹ÀÓÀ¸·Î ³ª´©¾îÁ® ÀÖÀ»¶§)
sub Win_link(txturl)
response.write "<script language='javascript'>"
response.write "parent.location.replace ('" & txturl & "');"
response.write "</script>"
response.end
end sub
'----------------- ⠴ݱâ ----------------------------------
sub win_close()
response.write "<script language='javascript'>"
response.write "window.close();"
response.write "</script>"
response.end
end sub
ÆÄÀÏÀ» include ÇϽÅÈÄ
Alert "ÇÏÇÏÇÏ"
Alert_back "ÇÏÇÏÇÏ"
Alert_url "ÇÏÇÏÇÏ"
Win_link "ÇÏÇÏÇÏ","ȣȣȣ"
win_close()
¿Í °°Àº Çü½ÄÀ¸·Î »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
Áñ°Å¿î ÇÁ·Î±×·¡¹Ö µÇ¼¼¿ä.