form表单
<form name="form" id="form" method="GET/POST" action = "提交url" target=“_blank_parent_self_top” enctype="multipart/formdata" />
<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/formdata"
<input type="file" accept="application/msword" ><br><br>accept属性列表<br>
accept="application/msexcel"
accept="application/msword"
accept="application/pdf"
accept="application/poscript"
accept="application/rtf"
accept="application/xzipcompressed"
accept="audio/basic"
accept="audio/xaiff"
accept="audio/xmpeg"
accept="audio/xpn/realaudio"
accept="audio/xwaw"
accept="image/gif"
accept="image/jpeg"
accept="image/tiff"
accept="image/xmsbmp"
accept="image/xphotocd"
accept="image/xpng"
accept="image/xportablebitmap"
accept="image/xportablegreymap"
accept="image/xportablepixmap"
accept="image/xrgb"
accept="text/html"
accept="text/plain"
accept="video/quicktime"
accept="video/xmpeg"
accept="video/xmsvideo"
在这里如果想支持多种类型的话比如金山的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>value</option>
</select>
<select name="" id="" size=“” class="" multiple >
//菜单格式全部列出来
可以有多个选中
<option value="">value</option>
</select>
<textarea name="" id="" rows="" cols="" value="" >xxxxx</textarea>
</form>
id唯一
URL编码中文特殊符号等
url的参数如果有特殊符号?/等可以urlencode编码获取后用urldecode解码