javascript typeofÓ¦ÓÃ
typeof ÊÇJavaScriptµÄÔËËã·û
——·µ»ØÒ»¸öÓÃÀ´±íʾ±í´ïʽµÄÊý¾ÝÀàÐ͵Ä×Ö·û´®
typeof[(] expression [)] //typeofÓï·¨ÖеÄÔ²À¨ºÅÊÇ¿ÉÑ¡Ïî
typeof ÔËËã·û@import url(../html-vss/msdnie4a.css);
typeof
ÔËËã·û°ÑÀàÐÍÐÅÏ¢µ±×÷×Ö·û´®·µ»Ø¡£typeof
·µ»ØÖµÓÐÁùÖÖ¿ÉÄÜ£º "number," "string,"
"boolean," "object," "function," ºÍ "undefined."
ʵÀý<html>
<head>
<title>typeof²âÊÔÓÃÀýÒ³Ãæ</title>
<mce:script type="text/javascript"><!--
t = function(i) {
alert(typeof 123);//number
alert(typeof("123"));//String
}
// --></mce:script>
<mce:style type="text/css"><!--
div {
opacity: 0.5;
}
--></mce:style><style type="text/css" mce_bogus="1"> div {
opacity: 0.5;
}
</style>
</head>
<body>
<div onclick="t(1)">²âÊÔtypeof</div>
</body>
</html>
Ïà¹ØÎĵµ£º
µÚÈýÕ DOM Scripting DOM±à³Ì
DOM scripting is expensive, and it's a common performance bottleneck in rich web applications. This chapter discusses the areas of DOM scripting that can have a negative effect on an application's responsiveness and gives recommendations o ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>five-in-a-raw</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
  ......
<script>
//дcookiesº¯Êý ×÷ÕߣºµÔÕñ¿
function
SetCookie(name,value)//Á½¸ö²ÎÊý£¬Ò»¸öÊÇcookieµÄÃû×Ó£¬Ò»¸öÊÇÖµ
{
var Days = 30;
//´Ë cookie ½«±»±£´æ 30 Ìì
var exp = new Date(); //new
Date("December 31, 9998");
  ......
£¼script language="javaScript"£¾
function closeWindow()
{
¡¡window.opener = null;
¡¡window.open(' ', '_self', ' ');
¡¡window.close();
}
£¼/script£¾
£¼input type='button' value='¹Ø±Õ´°¿Ú' onClick="closeWindow()"£¾
»ò
£¼input type="button" value="¹ ......