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. EasyUI系列学习(二)-使用EasyUI

    一.引入必要文件 <!--1.0引入jQuery核心库--> <script src="jquery-easyui-1.4.4/jquery.min.js"> ...

  2. Android开发笔记(9)——初步设置Menu

    转载请注明:http://www.cnblogs.com/igoslly/p/6858656.html   初步设置Menu   设置Menu,在ActionBar上添加按钮操作:         在 ...

  3. SQL基本操作——存储过程

    存储过程类似于C#中的方法. --创建存储过程 create proc usp_TwoNumberAdd @num1 int, @num2 int as begin select @num1+@num ...

  4. servlet得到web应用路径

    package context; import java.io.IOException; import javax.servlet.ServletContext; import javax.servl ...

  5. 【译】x86程序员手册15-5.2页转换

    5.2 Page Translation 页转换 In the second phase of address transformation, the 80386 transforms a linea ...

  6. WPF中的两个绑定场景

    1. 如何在诸如ListBox这样的项中绑定父类数据上下文. <ListBox Grid.Row=" ItemsSource="{Binding Entries}" ...

  7. SpringMVC(四)@RequestParam

    使用@RequestParam可以将URL中的请求参数,绑定到方法的入参上,并通过@RequestParam的3个参数进行配置 Modifier and Type Optional Element D ...

  8. JavaScript:一句代码输出重复字符串(字符串乘法)

    看到一个题目要求写一个函数times,输出str重复num次的字符串. 比如str:bac     num:3 输出:abcabcabc 除了利用循环还有几种方法,我学习研究之后记下以下三种方法. 1 ...

  9. 网络:NAT使用场景

    NAT:Network Address Translation  网络地址转换 使用场景:家庭局域网,公司局域网的网络设备没有公网IP地址如何访问互联网? 简单图示: 理解一些原理: 1,互联网中网络 ...

  10. python爬虫16 | 你,快去试试用多进程的方式重新去爬取豆瓣上的电影

    我们在之前的文章谈到了高效爬虫 在 python 中 多线程下的 GIL 锁会让多线程显得有点鸡肋 特别是在 CPU 密集型的代码下 多线程被 GIL 锁搞得效率不高 特别是对于多核的 CPU 来说 ...