logo 西林@生存 - 骑猪闯天下!
放弃兼容Opera 8
2007-9-12 11:33:00 By:xling

经过测试,Opera8 (Opera 9 以下的版本),不支持Form 的属性:enctype 的值为: "text/plain".

以下是抓包:

POST http://www.baidu.com/ HTTP/1.0
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; zh-cn) Opera 8.0
Host: www.baidu.com
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: zh-cn, en
Accept-Charset: gbk, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Proxy-Authorization: Basic bmlja3I6MjAyNzIwbmljaw==
Proxy-Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 62

textarea=a%3Db%0D%0Ac%3Dd%0D%0Ae%3Df&button=%E6%8F%90%E4%BA%A4

 

POST http://www.baidu.com/ HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Content-Type: text/plain
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler ; InfoPath.2; .NET CLR 2.0.50727)
Host: www.baidu.com
Content-Length: 39
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: BAIDUID=4FAADCED051C9D783F7C6398B1D52AB3
Proxy-Authorization: Basic bmlja3I6MjAyNzIwbmljaw==

textarea=a=b
c=d
e=f
button=鎻愪氦

 

POST / HTTP/1.1
Host: www.baidu.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: BAIDUID=1AFCAA63A05948B65D2A5BACC30A5BFC
Proxy-Authorization: Basic bmlja3I6MjAyNzIwbmljaw==
Content-Type: text/plain
Content-Length: 33

textarea=a=b
c=d
e=f
button=肖

 

另外:在Opera 8下,用document.createElement("<form name='f1'>")来生成一个Form的话,实际生成的是:

<<form name='f1'>><</form name='f1'>>

而且不会报错,以至于我写好的代码工作出现问题:

 if(!($.$c instanceof Function)) $.$c = function(tag,name){
  try{
   if(typeof name == "string")
    return d_.createElement("<" + tag + " name='" + name + "'>");
   else
    return d_.createElement(tag);
  }catch(e){
   return d_.createElement(tag);
  }
 }

 

还有,在设置属性的时候,Opera 8 必须用setAttribute,最BT的是:

   div_.style.cssText = "width:0px;height:0px;overflow:hidden";//Can not remove it,it for IE
   div_.setAttribute("style","width:0px;height:0px;overflow:hidden");//For Opera 8

如果只写上面一句的话,在opera 8下,div_就没有style属性!

汗。。。

以上所述问题在 Opera 9下不存在。

转我的贴,写你的名,是一种可耻的行为!请不要让我BS你!
阅读全文 | 回复(1) | 引用通告 | 编辑
2007-9-13 9:43:00')" onMouseOver="vControl('CHANGECOLOR',this)" onMouseOut="vControl('RESETCOLOR',this)"> Re:放弃兼容Opera 8
2007-9-13 9:43:00 By:felixmaomao
一看照片
就知道你是学习好的孩子
天天都看你写的我看不懂的东西
看了还是不懂
维萨学习好的孩子都张的这个样子
支持你
加油

以下为blog主人的回复:

错!大错特错!我上学时,非睡觉即逃课!

转我的贴,写你的名,是一种可耻的行为!请不要让我BS你!
个人主页 | 引用 | 返回 | 删除 | 回复

发表评论:

    密码:
    主页:
    标题:
    页面数据正在载入...
<<  < 2008 - >  >>
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Placard
请职:PHP或JS都行,如果学历要求本科的,请直接忽略。谢谢。 有意者请联系:1fairy1#163.com
Logon System
Search
Info about this blog
Others
myDream
JGrid

数据表格
JTree

树状控件
JMenuTab

标签控件(滑动门)
JTrackBar / JScroll

滑动条/模拟滚动条
JAccordion

(QQ菜单)
关于:
xling,也叫xlingFairy 艾克司令 西林.
Email:1fairy1#163.com
喜欢javascript,喜欢java(汗...还在学习中...水平菜的要死...)
bxna 京ICP备05002321号