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();
相关文档:
先来看一个简单的例子:
下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。
frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> frame < ......
此例子是javascript高级程序设计里的
放出来心备以后使用。上代码。
<html>
<head>
<title>Table Sort Example</title>
<mce:script type="text/javascript"><!--
function convert(sValue, sDataType) {
swi ......
The ExternalInterface API
之前我们使用flash调用javascript函数,一般使用这样的方法:
代码:
getURL(“javascript:alert(‘hello zhang-chao.com’);”); //注意字符串 双引号 里面加单引号
但是使用这种方法从flash调用javascript函数仍存在许多困难 ......
function sAlert(msg,boxtype,func,msgtitle)
sAlert('信息内容',1,'','信息标题')
@msg:提示信息内容
@boxtype:1为弹出框,2为确认框,3为提示框
@func:点确认时执行的函数
@title:信息框标题文字内容
只有msg是必须的,后面的参数可以省略。如果中间的参数为空则在对应位置上''或者 ......