getAttribute

大部分介绍都说仅仅有一个。包含w3cschool。

事实上这种方法在iE7下有两个參数。

msdn 上查到的。

简单翻一下

0 是默认情况,不区分大写和小写!

1 区分大写和小写
2 返回字符串,这个加不加我没发现有什么差别!
4仅对url有效!比方属性的值为/posetedit/31234,加上这个參数会加上域名,自己主动补全url,变为http://xxx.com//posetedit/31234

注:这些事实上仅仅针对ie7(包含IE7)曾经的版本号

源文档:

Syntax

object.getAttribute(strAttributeName,
lFlags)

Parameters

strAttributeName [in]

Type: String

String that specifies the name of the attribute.

lFlags [in, optional]

Type: Integer

Integer that specifies one or more of the following flags:

0

Default. Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found.

1

Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in strAttributeName must exactly match those in the attribute name.

2

Returns attribute value as a String. This flag does not work for event properties.

4

Returns attribute value as a fully expanded URL. Only works for URL attributes.

Return value

Type: Variant

Variant that returns a StringVariant of type Integer, or Boolean value as defined by the attribute. If the attribute is not present, this method returns null.

msdn:http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx

getAttribute for IE7的更多相关文章

  1. js查找元素

    1.className <!DOCTYPE html> <html> <head lang="en"> <meta charset=&qu ...

  2. 聊聊一直困扰前端程序员的浏览器兼容-【JavaScript】

    上篇已经写过浏览器的兼容发展历史以及主流浏览器,主要的css兼容我知道的已全部写到,这篇这篇专攻javascript的兼容. 1.getYear()方法 var year = new Date().g ...

  3. JS-DOM-随时更新

    DOM里有三种节点:元素节点.文本节点和属性节点 getElmentById(); //id选择器  在JS中用此方法来查找获取  建议大小写 以免不兼容 有时候查找不到  DOM操作必须等到HTML ...

  4. JS—DOM操作

    节点分为三类: 1.元素节点:标签<div></div> 2.文本节点:标签内的纯文本. 3.属性节点:标签内的属性,id或class 查找元素: getElementById ...

  5. IE6、IE7、IE8的CSS、JS兼容

    Internet Explorer 6中查看使用 Microsoft JScript 的网页,可能会遇到web浏览器速度较慢的性能问题.原因是如果js脚本同时创建大量变量,jscript引擎执行垃圾收 ...

  6. 一行代码轻松搞定各种IE兼容问题,IE6,IE7,IE8,IE9,IE10

    在网站开发中不免因为各种兼容问题苦恼,针对兼容问题,其实IE给出了解决方案Google也给出了解决方案百度也应用了这种方案去解决IE的兼容问题? 百度源代码如下: <!Doctype html& ...

  7. setAttribute()、getAttribute()与ele[attr]与自定义属性

    一.自定义属性设置 1.setAttrbute() var q=document.getElementById("q"); q.setAttribute("index&q ...

  8. ie6 ie7 userdata 本地存储 引发的惨案.

    我使用 documentElement 作为userdata 作为本地存储的载体. document.documentElement.addBehavior("#default#userda ...

  9. 兼容ie6,ie7,ie8,firefox,chrome浏览器的代码片段

    hack实现方式和原理 #hacker{ color:red; *color:white; /*for ie6,ie7*/ *+color:blue; /*for ie7*/ _color:gray; ...

随机推荐

  1. SQL数据库还原的二种方式和区别

    1.数据库还原 在SQL中,直接选择选择“还原数据库”:选中.bak 文件即可. 2.生成脚本 新建同样的DB名字,在SQL打开脚本,执行脚本语言.数据库里面就会自动填充内容.

  2. flask web 表单验证 WTForms

    简介 WTForms 是一个flask集成框架,或者说是库,用于处理浏览器表单提交的数据,它在flask-WTF的基础上扩展并添加了一些随手可得的精巧帮助函数,这些函数将会是在flask里使用表单更加 ...

  3. wordpress 你所不知道的固定链接设置方法,设置适合自己的个性固定链接,适合SEO

    %year% 年份,四位数字,例如2004年  %monthnum% 一年的月份,例如05  %day% 一个月的日子,例如28  %hour% 一天中的小时,例如15  %minute% 小时,例如 ...

  4. activity间传递参数

    传递值对象 值对象可以理解为自定义的数据类型对象. 为了完成这个知识点的讲解,先来创建一个User类型的类,它有name和age两个属性,然后请添加getter/setter方法,构造方法等基本方法. ...

  5. web流行工具

    中小型公司: Node.js:现代工业化前端的基础: RequireJS:AMD规范, 即将过时的 JavaScript 模块化方案: Bower:前端模块源: npm:前端工具源,另一个潜在的前端模 ...

  6. servlet-请求重定向

    package servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.ser ...

  7. Js配置资料下载

    1.使用windows.loaction.href链接下载: 此种下载在本页打开,eg:windows.location.href = http://www.xxx.xx/aa.apk; 2.使用wi ...

  8. CSS动画:旋转卡片效果

    <!DOCTYPE html> <html> <head> <title>demo</title> </head> <bo ...

  9. 11-c++虚拟函数

    虚拟函数 #include "stdio.h" class A{ public: void print() { printf("%s","this i ...

  10. tailf

    功能说明:tailf命令几乎等同于tail -f,与tail -f不同的是,如果文件不增长,那么它不会去访问磁盘文件,也不会更改文件的访问时间.tailf命令在工作中的主要使命就是跟踪日志文件,首先将 ...