Please write this script before <hTML> <Title> XXX </Title> </html>!
The following is a quotation fragment: <script language = "javascript"> Function tosystem (addtitle) { var ReviseDtitle; varcurrenttital; Currenttital = document.frmannound.key.value; Reviedtitle = Currenttatic addtitle; document.frmannound.key.Value = Reviedtitle; document.frmannound.key.focus (); Return;} </script> |
"Key" is the name = "key" attribute of the text box
"FRMANNOUNCE" is the name of the form, that is, <form name = "FRMANNOUNCE"> </Form>
At <input type = "text" size = 21 name = "se" value = "<%= key%>">
Add the statement back:
The following is the code fragment: <%Response.write "<a href = 'javascript: tosystem (" "" "")'> division character </a> "%> |
Just like it!
The role of this example:
In the background management, the keyword segmentation symbols are entered in the text box frequently, which is more troublesome to add the information. You can use this segment!
Clicked directly to the hyperlink, thereby triggering the script function tosystem () to achieve the purpose of adding a division "|".