首 页   · 站长博客 · 用户注册 · 会员登陆  · 会员排行  ·最新主题  ·最近回复  精华区  版权声明  ·论坛管理
  当前登录身份:游客,请先登录。  笔名: 口令: 验证码:   
楼 主  index »  HTML/JS/CSS技术专区 » 表单标记  


  作者:lxshark
  注册时间:2009-08-06
  主题/回复:49/50
  积分:639
  等级:★★★(六级)
  称号:声名鹊起

  lxshark@yeah.net..
  593993745
  hi.baidu.com/mythicsky

 

 发表:2009-08-10 19:15:25 阅读 2987 次 回复 1 次 得分1  |   字号 字色
表单标记


表单的基本语法
<form action="url" method=*>
... 
... 
<input type=submit> <input type=reset>
</form>
*=GET, POST 

5.隐藏表单元素

代码如下:
<input type=hidden value=*>
<form action=/cgi-bin/post-query method=POST>
<input type=hidden name=add value=hoge@hoge.jp>
Here is a hidden element. <p>
<input type=submit><input type=reset>
</form>






6.列表框

基本语法
代码如下:
<select name=*>
<option> ...
</select>
<option selected>
<option value=**>
<form action=/cgi-bin/post-query method=POST>
<select name=fruits>
        <option>Banana
        <option selected>Apple
        <option value=My_Favorite>Orange
</select><p>
<input type=submit><input type=reset>
</form>

<select size=**>
<form action=/cgi-bin/post-query method=POST>
<select name=fruits size=3>
        <option>Banana
        <option selected>Apple
        <option value=My_Favorite>Orange
        <option>Peach
</select><p>
<input type=submit><input type=reset>
</form>

<select size=** multiple>
注意,是用 Ctrl 键配合鼠标实现多选。
(和 MS-WINDOWS 的 File Manager 一样) 
代码如下:
<form action=/cgi-bin/post-query method=POST>
<select name=fruits size=3 multiple>
        <option selected>Banana
        <option selected>Apple
        <option value=My_Favorite>Orange
        <option selected>Peach
</select><p>
<input type=submit><input type=reset>
</form>

 

7.文本区域

代码如下:
<textarea name=* rows=** cols=**> ... <textarea>
<form action=/cgi-bin/post-query method=POST>
<textarea name=comment rows=5 cols=60>
</textarea>
<P>
<input type=submit><input type=reset>
</form>






对于很长的行是否进行换行的设置(Word Wrapping)
<textarea wrap=off> ... </textarea>
不换行,是缺省设置。 

<textarea wrap=soft> ... </textarea>
“软换行”,好象 MS-WORD 里的“软回车”。

代码如下:
<form action=/cgi-bin/post-query method=POST>
<textarea wrap=soft name=comment rows=5 cols=25> </textarea><P>
<input type=submit><input type=reset>
</form>





代码如下:
<textarea wrap=hard> ... </textarea>
“硬换行”,好象 MS-WORD 里的“硬回车”。

<form action=/cgi-bin/post-query method=POST>
<textarea wrap=hard name=comment rows=5 cols=25> </textarea><P>
<input type=submit><input type=reset>
</form>








表单中提供给用户的输入形式
代码如下:
<input type=* name=**>
*=text, password, checkbox, radio, image, hidden, submit, reset

**=Symbolic Name for CGI script

2.文字和密码输入
代码如下:

*=text, password

<input type=*>
<input type=* value=**>
<form action=/cgi-bin/post-query method=POST>
您的姓名: 
<input type=text name=姓名><br>
您的主页的网址: 
<input type=text name=网址 value=http://><br>
密码: 
<input type=password name=密码><br>
<input type=submit value="发送"><input type=reset value="重设">
</form>


 
代码如下:

<input type=* size=**>
<input type=* maxlength=**>
<form action=/cgi-bin/post-query method=POST>
<input type=text name=a01 size=40><br>
<input type=text name=a02 maxlength=5><br>
<input type=submit><input type=reset>
</form>


3.复选框和单选框

代码如下:
<input type=checkbox>
<input type=checkbox checked>
<input type=checkbox value=**>
<form action=/cgi-bin/post-query method=POST>
<input type=checkbox name=水果1>
        Banana<p>
<input type=checkbox name=水果2 checked>
        Apple<p>
<input type=checkbox name=水果3 value=橘子>
        Orange<p>
<input type=submit><input type=reset>
</form>

<input type=radio value=**>
<input type=radio value=** checked>
<form action=/cgi-bin/post-query method=POST>
<input type=radio name=水果>
        Banana<p>
<input type=radio name=水果 checked>
        Apple<p>
<input type=radio name=水果 value=橘子>
        Orange<p>
<input type=submit><input type=reset>
</form>

4.图像坐标

代码如下:
<input type=image src=url>
<form action="post-query" method="post">    <input type="image" src="images/01.jpg" name="face" />  <input type="radio" name="zoom" value="2" checked="checked" />      x2      <input type="radio" name="zoom" value="4" />      x4      <input type="radio" name="zoom" value="6" />      x6      <input name="reset" type="reset" /></form>


x2 x4 x6
 
 1#楼  
 
  回复人:yanwanrong
  注册时间:2009-10-20
  主题/回复:0/39
  积分:101
  等级:★☆(三级)
  称号:牛刀小试

   
 1#楼 发表于2009-11-02 16:11:18  评分:1 

回复给楼主(lxshark)
The figures are made through an interesting process (watch the video, it's awesome),and I wish I could get my own characters immortalized in resin powder,too.All you have to do is write on the contest page answering the question, "What world of warcraft race/class do you play and why should your toon get the FigurePrints treatment?"The winner will be revealed in four days or so,and just like our contests over here at igolg.com,posting more than once will get you into all sorts of trouble with ninjas world of warcraft gold(or just disqualified, I think).Speaking of contests,we're still looking for some lucky readers to win those cheap wow gold headsets from Creative.So much swag being thrown around these days!buy wow gold Statues?Headsets?What's next,Thrall underoos?Stay tuned.
  页数1/1首页 « 1 » 末页
  发表回复:您还没有登陆,无法发表回复。请先[登陆]

一起PHP技术联盟 主办:一起PHP 联系方式:站长QQ:4304410 QQ群:8423742 20159565 站长博客 E-mail: nqp@nqp.me 执行时间:0.016sec
SimsmaBBS 2008 (v6.0) Developed by 17php.com,Copyright(C)2003-2010 All rights reserved. 副本授权:一起PHP官方专用版