javascript Ìø×ª ÈýÖÖ
<html>
<head>
<mce:script language="javascript"><!--
function old_page()
{
window.location = "http://www.jb51.net"
}
function replace()
{
window.location.replace("http://www.jb51.net")
}
function new_page()
{
window.open("http://www.jb51.net")
}
// --></mce:script>
</head>
<body>
<input type="button" onclick="new_page()" value="new_page"/>
<input type="button" onclick="old_page()" value="old_page"/>
<input type="button" onclick="replace()" value="replace"/>
</body>
Ïà¹ØÎĵµ£º
var OnPasteCheckIntNum = function()
{
if(window.clipboardData)
{
if(isNaN(window.clipboardData.getData('text')))
{
......
µÚÒ»Ìâ
±àдһ¸ö·½·¨ ÇóÒ»¸ö×Ö·û´®µÄ×Ö½Ú³¤¶È
µÚ¶þÌâ
ÈçºÎ¿ØÖÆalertÖеĻ»ÐÐ
µÚÈýÌâ
½âÊÍdocument.getElementById("ElementID").style.fontSize="1.5em"
µÚËÄÌâ
½«Ò»¸öÀàËÆÍ¼ÖеÄЧ¹û·ÖÀë³ÉcssºÍhtml
µÚÎåÌâ
°´ÕÕ¸ñʽ xxxxÄêxxÔÂxxÈÕxxʱxx·ÖxxÃ붯̬ÏÔʾʱ¼ä ÒªÇó²»×ã10µÄ²¹0
µÚÁùÌâ
±àдһ¸ö·½·¨ È¥µôÒ» ......
±¾ÎÄ×÷ÕßΪDavid
Mandelin£¬©¤©¤Mozilla JavaScriptÍŶӹ¤×÷ÈËÔ±¡£
Firefox 3.5ÓµÓÐÒ»¸öȫеÄJavaScriptÒýÇæ£¬½Ð×öTraceMonkey£¬ÔÚ¸ÃÒýÇæÉÏÅÜJSÓ¦ÓÃÒª±ÈFirefox
3¿ìµ½3-4±¶£¬´Ó¶øÎªÏÖÓеÄÍøÂçÓ¦ÓüÓËÙ¡£ÕâÆªÎÄÕ´óÖµÄÃèÊöÒ»ÏÂÔÚTraceMonkeyÖаüÀ¨µÄÖØÒª²¿¼þ£¬ÒÔ¼°ËûÃÇÊÇÈçºÎ¼ÓËÙJavaScriptµÄ¡£Í¬Ñù£¬ÔÚÁ˽âÕâÐ ......
ÔÚprototype¿ò¼ÜÖеÄÀà¼Ì³ÐʵÏÖ»úÖÆ
//ΪObjectÀàÌí¼Ó¾²Ì¬·½·¨£ºextend
Object.extend = function(destination, source) {
for(property in source) {
destination[property] = source[property];
}
return destination;
}
//ͨ¹ýObjectÀàΪÿ¸ö¶ÔÏóÌí¼Ó·½·¨ ......