展会信息港展会大全

关于php程序员必知必会的一些html知识
来源:互联网   发布日期:2016-03-02 15:16:50   浏览:1550次  

导读:1.form表单, form name=form1 id=form1 method=GET/POST action = 提交url target=“_blank,_parent,_self,_top” enctype=multipart/form-data / input type=“text” name=“” id= value= class= / input type=“password” name=“” id= value= class=...

1.form表单,

<form name="form1" id="form1" method="GET/POST" action = "提交url"target=“_blank,_parent,_self,_top” enctype="multipart/form-data" />

<input type=“text” name=“” id="" value="" class="" />

<input type=“password” name=“” id="" value="" class="" />

<input type=“file” name=“” id="" value="" class="" accept=“” />上传文件一定要用post方法上传还要是enctype="multipart/form-data"

<input type="file" accept="application/msword" ><br><br>accept属性列表<br>

1.accept="application/msexcel"

2.accept="application/msword"

3.accept="application/pdf"

4.accept="application/poscript"

5.accept="application/rtf"

6.accept="application/x-zip-compressed"

7.accept="audio/basic"

8.accept="audio/x-aiff"

9.accept="audio/x-mpeg"

10.accept="audio/x-pn/realaudio"

11.accept="audio/x-waw"

12.accept="image/gif"

13.accept="image/jpeg"

14.accept="image/tiff"

15.accept="image/x-ms-bmp"

16.accept="image/x-photo-cd"

17.accept="image/x-png"

18.accept="image/x-portablebitmap"

19.accept="image/x-portable-greymap"

20.accept="image/x-portable-pixmap"

21.accept="image/x-rgb"

22.accept="text/html"

23.accept="text/plain"

24.accept="video/quicktime"

25.accept="video/x-mpeg2"

26.accept="video/x-msvideo"

在这里如果想支持多种类型的话,比如金山的office和microsoft的office的不同扩展名,这样的话可以在accept里面放置多个属性就可以了:

<form> <input type="file" name="pic" id="pic" accept="image/gif, image/jpeg" /></form>

如果不限制图像的格式,可以写为:accept="image/*"。同样是可以的

php处理页面的获取$_FILES['NAME']['name']

<input type=“image” name=“” id="" class=""src="路径" />具备按钮功能哦

<input type=“radio” name=“” id="" value="" class="" checked="checked" /> 一组用相同的name

<input type=”checkbox“ name=“name[]” id="" value="" class=""checked="checked" />dom对象.checked= true or false

<input type=“submit” name=“” id="" value="" class="" />提交

<input type=“reset” name=“” id="" value="" class="" />重置表单

<input type=“button” name=“” id="" value="" class="" />按钮

<input type=“hidden” name=“” id="" value="" class="" />隐藏域

<select name="" id=""class="" >

<option value=""selected='selected'>value1</option>

</select>

<select name="" id="" size=“” class="" multiple >

//菜单格式,全部列出来

可以有多个选中

<option value="">value1</option>

</select>

<textarea name="" id="" rows="" cols="" value="" >xxxxx</textarea>

</form>

id唯一

URL编码。中文,特殊符号,等。

url的参数如果有特殊符号,?/等,可以urlencode编码。。。。获取后用urldecode解码。

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港