JAVASCRIPT的instanceof分析
function class1(){
alert("class1");
};
function class2(){
alert("class2");
}
class2.prototype=class1.prototype;
var obj=new class2();
alert(obj instanceof class1);
alert(obj instanceof class2);
alert(class2.prototype.constructor);
class2.prototype.constructor();
相关文档:
演示地址: http://www.wowo-design.com/view/51_01/index.htm
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css菜单演示</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
......
日前,Mozilla 的 Arun Ranganathan 向 W3C 提交了一个草案,旨在推出一个 JavaScript API,让
JavaScript 脚本直接操作本地文件,Firefox 的最新浏览器版本中已经对该 API 提供了大量的支持,不过出于安全考虑,该API
将只对本地文件提供有限的访问。
该 API 引入了一个 FileReader 对象,可以异步加载本地文件系统中的 ......
在页面上回车后,不做任何动作。
<script type="text/javascript">
function document.onkeydown()
{
if(event.keyCode ==   ......
The ExternalInterface API
之前我们使用flash调用javascript函数,一般使用这样的方法:
代码:
getURL(“javascript:alert(‘hello zhang-chao.com’);”); //注意字符串 双引号 里面加单引号
但是使用这种方法从flash调用javascript函数仍存在许多困难 ......