Skip to content

HTML Note3 Form, List, Table

snowicecat edited this page Jun 8, 2015 · 12 revisions

<form>

<form> and <\form> represents the beginning and the end.

Everything inside form becomes a kind of text, option, selections or even like dialog box.

<input>

e.g <input type="[typename]" name="[name]" ... />

Typename

  • **text** (include value/placeholder)
  • **password** (include value/placeholder)
  • **email** (only can text email form content in the dialog, include value/placeholder)
  • **radio** (single checkbox)
  • **checkbox** (multiple checkbox)
  • **submit** (submit button, include value)
  • **number** (include value/placeholder, min, max, step)
	<form>
	
		<input type="text" value="example" name="text1"/>
		<input type="text" placeholder="type here" name="text2"/>
		<input type="email" placeholder="type email here" name="email"/>
		<br />
		<br />
		
		<textarea name="textarea">textarea</textarea>
		
		<br />
		
		<select name="select">
			<option>Select Option...</option>
			<option>1</option>
			<option>2</option>
			<option>3</option>
		</select>
		
		<br />
		
		<input type="radio" name="color"/> Red
		<input type="radio" name="color"/> Green
		
		<br />
		
		<input type="checkbox" name="dog"/> Dog
		<input type="checkbox" name="cat"/> Cat
		<input type="checkbox" name="fish"/> Fish
		
		<br />
		
		<input type="submit" value="Click Me to Submit!" />
	</form>

PS:action中的属性指向你的servlet控制器,就是你的web.xml中配置的servlet-mapping中配置的/LoginServlet通过servlet-name关联到你上面配置的servlet-class指向的class类,页面上直接写LoingServlet就可以了,不用加../ <form action="">

Link

If wanna add Link to the HTML, use <a href="http://www.baidu.com">Baidu</a>

Usually, this tag is enclosed with <p><a href="http://www.baidu.com">Baidu</a></p>

####Link to a Part of this Page:

<a name ="top" />
...
...
...
<a href="#top"> Take me to the top of this page </a>
<input type="button" onclick="window.location.href('')" />Button

Table

Clone this wiki locally