ClassicASP 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
Alert "하하하"
Alert_back "하하하"
Alert_url "하하하"
Win_link "하하하","호호호"
win_close()
%>
참고사이트
http://fendee.egloos.com/7116610
http://ankyu.entersoft.kr/lecture/ASP/04_usefunc04.asp
'-----------------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
Alert "하하하"
Alert_back "하하하"
Alert_url "하하하"
Win_link "하하하","호호호"
win_close()
%>
참고사이트
http://fendee.egloos.com/7116610
http://ankyu.entersoft.kr/lecture/ASP/04_usefunc04.asp
댓글목록
등록된 댓글이 없습니다.