'================================================ ==========
'Function name: Alert
'Usage: the dialog box is displayed.
'Parameter: Alert ---- dialog box
'Str ---- text
'Usage: Alert "added successfully! "
'Return value: True
'================================================ ==========
Function alert (STR)
Response. Write ("<script language = JavaScript> alert ('" & STR & "') </SCRIPT> ")
End Function
'================================================ ==========
'Function name: alertandback
'Usage: the dialog box is displayed, and the previous page is returned.
'Parameter: alertandback ---- dialog box
'Str ---- text
'Usage: alertandback "added successfully! "
'Return value: True
'================================================ ==========
Function alertandback (STR)
Response. Write ("<script language = JavaScript> alert ('" & STR & "'); history. Back (-1) </SCRIPT> ")
End Function
'================================================ ==========
'Function name: alertandto
'Usage: the dialog box is displayed, and a webpage is opened with _ blank, _ Self ,...
'Parameter: alertandto ---- dialog box
'Str ---- text; href ---- webpage; Target ---- open mode
'Usage: alertandto "added successfully! "," Index. asp, _ blank"
'Return value: True
'================================================ ==========
Function alertandto (STR, href, target)
Response. write ("<script language = JavaScript> alert ('" & STR & "'); window. open ('"& href &"', '"& target &"') </SCRIPT> ")
End Function
'================================================ ==========
'Function name: alterredirect
'Usage: the dialog box is displayed and displayed on a webpage.
'Parameter: alterredirect ---- dialog box
'Msg ---- text, redirecturl --- webpage
'Usage: alterredirect "added successfully! "," Index. asp"
'Return value: True
'================================================ ==========
Function alterredirect (MSG, redirecturl)
Response. Write "<SCRIPT> alert ('" & MSG & "'); window. Location = '" & redirecturl & "'; </SCRIPT>"
End Function
'================================================ ==========
'Function name: redirecturl
'For use: Go to a webpage
'Parameter: redirecturl ---- dialog box
'Strurl ---- text
'Usage: redirecturl "index. asp"
'Return value: True
'================================================ ==========
Function redirecturl (strurl)
Response. Write "<SCRIPT> window. Location = '" & strurl & "'; </SCRIPT>"
End Function
'================================================ ==========
'Function name: alterclose
'Usage: a dialog box is displayed. Click OK to close the page.
'Parameter: alterclose ---- dialog box
'Msg ---- text
'Usage: alterclose "added successfully! "
'Return value: True
'================================================ ==========
Function alterclose (MSG)
Response. Write "<SCRIPT> alert ('" & MSG & "'); window. Close (); </SCRIPT>"
End Function
'================================================ ==========
'Function name: alterback
'Usage: the dialog box is displayed, and the previous page is returned.
'Parameter: alterback ---- dialog box
'Msg ---- text
'Usage: alterback "added successfully! "
'Return value: True
'================================================ ==========
Function alterback (MSG)
Response. Write "<SCRIPT> alert ('" & MSG & "'); history. Back (); </SCRIPT>"
End Function