?? form.jsp
字號:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<!--
Copyright (c) 2000 The Apache Software Foundation. All rights reserved.
Author: Shawn Bayern (shawn.bayern@oooo.com).
Author: Lance Lavandowska (lance@brainopolis.com).
This is a simple test of the "input" taglib. The <form> defaults to
GETting back to itself, which is convenient since you can see the
values that the browser sends back as well as tamper with them and
watch your changes get reflected on the form.
-->
<body bgcolor="#eeeeee">
<%@ taglib uri="http://jakarta.apache.org/taglibs/input-0.90" prefix="input" %>
<p>
<%
java.util.Hashtable h = new java.util.Hashtable();
h.put("foo", "bar");
h.put("whee", "ding");
h.put("empty", "");
%>
<form>
<p>
Username: <input:text name="username" attributes="<%= h %>" default="shawn" /><br />
Full Name: <input:text name="fullname" default="Shawn Bayern" />
<br />
<br />
Statement of purpose:
<input:textarea
name="purpose"
attributes="<%= h %>"
default="none at this time" />
<br />
<br />
Choose one:
<br />
<br />
<%
java.util.HashMap a = new java.util.HashMap();
// a.put("multiple", null);
java.util.Hashtable o = new java.util.Hashtable();
o.put("one", "1");
o.put("two", "2");
o.put("three", "3");
%>
<input:select name="choice" default="2"
attributes="<%= a %>" options="<%= o %>" />
<br />
<br />
<!-- the syntax for "defaults" for radio buttons and checkboxes seems
more sensible when the different buttons or boxes are constructed
automatically. it's still less tedious that having logic that
outputs "checked" on each line, though.
-->
Favorite letter?  
<input:radio name="radio" value="a" default="a"/>a
<input:radio name="radio" value="b" default="a"/>b
<input:radio name="radio" value="c" default="a"/>c
<input:radio name="radio" value="d" default="a"/>d
<br />
<br />
<%
String[] defaults = new String[2];
defaults[0] = "2";
defaults[1] = "5";
%>
Numbers you don't mind:  
<input:checkbox name="checkbox" value="1" defaults="<%= defaults %>"/>1
<input:checkbox name="checkbox" value="2" defaults="<%= defaults %>"/>2
<input:checkbox name="checkbox" value="3" defaults="<%= defaults %>"/>3
<input:checkbox name="checkbox" value="4" defaults="<%= defaults %>"/>4
<input:checkbox name="checkbox" value="5" defaults="<%= defaults %>"/>5
<input type="submit" />
</p>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -