一

{"type":"编程笔记"}


  • Home

  • Archives
  • Search

ie6中innerhtml的局限性

Posted on 2008-04-16   |   In javascript

IE的相关文档表明,在IE中,innerHTML在以下封闭标签中为只读属性:

  1. col
  2. colgroup
  3. frameset
  4. html
  5. style
  6. table
  7. tbody
  8. thead
  9. tfoot
  10. title
  11. tr

在这些标签中只能读取到innerHTML内容却无法设置,在其他浏览器却都是可以的。

另外在select标签对中用innerHTML写入option,在IE中是可以写入,但无法正常显示,写入的内容与innerHTML的内容已经不一样,不过将其innerHTML=''赋空值却是可以正确将select原来的options移除。

换一种写法,如:

Read more »

http request and response headers examples using telnet

Posted on 2008-04-08   |   In web

使用telnet进行http模拟请求。

Read more »

apache2 mod_headers using to modify http response headers

Posted on 2008-04-08   |   In linux

将mod_headers.so复制到modules目录下,修改httpd.conf文件:

Read more »

replacehtml instead innerhtml

Posted on 2008-04-08   |   In javascript

This is much faster than using (el.innerHTML = value) when there are many existing descendants, because in some browsers, innerHTML spends much longer removing existing elements than it does creating new ones.

Read more »

awk simple example

Posted on 2008-04-05   |   In linux

awk的内置函数

V 函数 用途或返回值
N gsub(reg,string,target) 每次常规表达式reg匹配时替换target中的string
N index(search,string) 返回string中search串的位置
A length(string) 求串string中的字符个数
N match(string,reg) 返回常规表达式reg匹配的string中的位置
N printf(format,variable) 格式化输出,按format提供的格式输出变量variable。
N split(string,store,delim) 根据分界符delim,分解string为store的数组元素
N sprintf(format,variable) 返回一个包含基于format的格式化数据,variables是要放到串中的数据
G strftime(format,timestamp) 返回一个基于format的日期或者时间串,timestmp是systime()函数返回的时间
N sub(reg,string,target) 第一次当常规表达式reg匹配,替换target串中的字符串
A substr(string,position,len) 返回一个以position开始len个字符的子串
P totower(string) 返回string中对应的小写字符
P toupper(string) 返回string中对应的大写字符
A atan(x,y) x的余切(弧度)
N cos(x) x的余弦(弧度)
A exp(x) e的x幂
A int(x) x的整数部分
A log(x) x的自然对数值
N rand() 0-1之间的随机数
N sin(x) x的正弦(弧度)
A sqrt(x) x的平方根
A srand(x) 初始化随机数发生器。如果忽略x,则使用system()
G system() 返回自1970年1月1日以来经过的时间(按秒计算)
Read more »
1…787980…99
yuweijun

yuweijun

492 posts
12 categories
RSS
GitHub Twitter
© 2021 yuweijun
Powered by Hexo
Theme - NexT.Mist.KISS