对web的补充

有一部分是原创,有一部分是转载,转载的我会在开头写上地址,原文写的很好

1.转载至http://hongjiang.info/http-application-x-www-form-urlencoded/

在servlet规范3.1.1节里,对POST数据何时会被当做parameters有描述:

1. The request is an HTTP or HTTPS request.

2. The HTTP method is POST.

3. The content type is application/x-www-form-urlencoded.

4. The servlet has made an initial call of any of the getParameter family of methods on the request object.If the conditions are met, post form data will no longer be available for reading directly from the request object’s input stream.

规范里已经明确的声明当请求满足: 1) http/https, 2) POST, 3) Content-type 是application/x-www-form-urlencoded, 4) 调用过getParameter方法;则数据会被当做请求的paramaters,而不能再通过 request 的 inputstream 直接读取。

2.对于jquery中获取值得三个方法:

⒈ val():获取属性的值,比如input表单项中name属性对应的value值;

⒉html():获取标签之间的html代码(包括文本值和html代码)

⒊text():获取标签之间的文本值(只获取文本值,不会处理标签之间的html代码。)



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值