Rendering: http://blog.9cbs.net/xiaoqy/gallery/Image/4414.aspx
Templates.js: http://blog.9cbs.net/xiaoqy/archive/2004/07/16/43454.aspx
Form.js: http://blog.9cbs.net/xiaoqy/archive/2004/07/16/43457.aspx
Basic.js: http:/blog.9cbs.net/xiaoqy/archive/2004/07/16/43459.aspx
Form.asp
<% @ Language = "JScript"%> <% // Create a AspTemplate object var TPL = new aspteMplate (); tpl.setfile ("file", "form.tpl"); var form = new Form ("FORM");
// Create a text box object var input = new text (); input.init ('name', "http_host"); input.setdesc ("text, password, multi-line text, hidden"); input.setpattern (" [0-9] "); form.addelement (input);
VAR f = new text (); f.init ("ffffffffffffffff", "test"); form.addelement (f);
// Create a selection list object var s = new select (); sinit ("s", "3"); s.setdesc ("select list, radio, multi-selection"); s.buildvalue ("a , B, C, D, E, F, G "); form.addelement (s);
// Create a radio button object var R = new radio (); R.INIT ("r", "a"); R.SetDesc ("radio button); R.BuildValue (" A, B, C) , D, E, F, G, H, J "); R.Radioassign (TPL," File "," TR>
// Create a multi-select button object // call other file TPL.SetFile ("OtherFile", "OtherFile.tpl");
Var c = new checkbox (); c.init ("c", "a"); C.SETDESC ("Select box, radio, multi-selection"); C.BUILDVALUE ("A, B, C, D, E, F, G, H "); C.checkboxassign (TPL," OtherFile "," TR>
// Resolution Output Main File Tpl.Parse ("OtherFiles", "OtherFile"); TPL.PARSE ("Main", "File", RESPONSE.WRITE (TPL.P ("main")); //// TPL.SHOWALL ();%> template:
Form.tpl
{text} td> {broker} TR > table> {{{{{{{{{{{}} = "Submit" value = "submit"> form>{FORM_ERRORMSG} body> html>
OtherFile.tpl
{text} td> { Broken} tr> table>
转载请注明原文地址:https://www.9cbs.com/read-15722.html New Post(0)
|