Please see the following example, this is an example program used to display book classification:
< %@ LANGUAGE=JavaScript % >
< html >
< body >
< form method=post >
Book classification; < %= getBooksListBox() %>
< p>
< input type=submit >
< %
function getBooksListBox()
{
BooksListBox = Application("BooksListBox")
if (BooksListBox != null) return BooksListBox;
crlf = (13, 10)
BooksListBox = "< select name=Books>" + crlf;
SQL = "SELECT * FROM Books ORDER BY Name";
cnnBooks = ("");
("Books", "Admin","");
rstBooks = (SQL);
fldBookName = rstBooks("BookName");
while (!){
BooksListBox = BooksListBox + " < option>" +
fldBookName + "" + crlf;
();
}
BooksListBox = BooksListBox + ""
Application("BooksListBox") = BooksListBox
' Pay attention to this sentence, the essence of Application technology should be
return BooksListBox;
}
% >
< %@ LANGUAGE=JavaScript % >
< html >
< body >
< form method=post >
Book classification; < %= getBooksListBox() %>
< p>
< input type=submit >
< %
function getBooksListBox()
{
BooksListBox = Application("BooksListBox")
if (BooksListBox != null) return BooksListBox;
crlf = (13, 10)
BooksListBox = "< select name=Books>" + crlf;
SQL = "SELECT * FROM Books ORDER BY Name";
cnnBooks = ("");
("Books", "Admin","");
rstBooks = (SQL);
fldBookName = rstBooks("BookName");
while (!){
BooksListBox = BooksListBox + " < option>" +
fldBookName + "" + crlf;
();
}
BooksListBox = BooksListBox + ""
Application("BooksListBox") = BooksListBox
' Pay attention to this sentence, the essence of Application technology should be
return BooksListBox;
}
% >