javascript tips 2

Jump to postion quickly:
obj.scrollIntoView(true)

Anchor:
<a name="first">
<a href="#first">anchors</a>

Transfer variables:
location.search();

Make div or elements editable:
document.getElementById('divid').contenteditable=true

Execute menu command:
obj.execCommand

Transparency background:
<IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>

Get current style content:
obj.style.cssText

HTML lable:
document.documentElement.innerHTML

The first style label:
document.styleSheets[0]

The first style of stylesheet:
document.styleSheets[0].rules[0]

Avoid that when click empty link, page scrolls to top:
<a href="javascript:function()">word</a>

Get last page url:
document.referrer

2291,Nickname,Homepage or email,Comments here,Add comment