一条,二更。三什么:javascript,html高手进

来源:百度文库 编辑:中科新闻网 时间:2024/04/30 11:04:40
<script type="text/javascript" src="http://www.c-island.jp/counter/gcgcggcc.js"></script>
这个段码放在哪里可以看到他的效果啊?
说详细点~

这一段代码是调用javascript文件gcgcggcc.js,至于此代码所具有的功能需要看到js才能决定。所以需要将此js文件用下载工具按照以上的地址下载下来。以下是js文件中的内容
document.write('<object id="cocoa" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"');
document.write(' width="160" height="230">');
document.write('<param name="movie" value="http://www.c-island.jp/flash/counter.swf">');
document.write('<param name="flashvars" value="id_value=gcgcggcc">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="quality" value="high">');
document.write('<embed name="cocoa" src="http://www.c-island.jp/flash/counter.swf" quality="high"');
document.write(' flashvars="id_value=gcgcggcc"');
document.write(' wmode="transparent"');
document.write(' width="160" height="230"');
document.write(' swliveconnect="true"');
document.write(' type="application/x-shockwave-flash"');
document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</embed>');
document.write('</object>');
总的来说,这个js文件主要使用document.write对网页进行代码写入。
而所写入的代码的功能是显示一个flash文件,就是这个flash http://www.c-island.jp/flash/counter.swf

你可以试一试以下的代码,我使用DREAMWARE生成的
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head>
<script language="JavaScript" type="text/javascript" src="gcgcggcc.js"></script>

<body>
</body>
</html>

注意,你需要将以上的源码放到html文件中,之后将上面的js代码存成gcgcggcc.js文件存在和html相同的目录中,同时将flash的路径改成一个你有的flash文件,放在和html相同的目录中。如,有aa.swf文件,将js文件中的document.write('<param name="movie" value="http://www.c-island.jp/flash/counter.swf">');
更改为
document.write('<param name="movie" value="aa.swf">');

这个js文件就是添加一个flash,可以直接把上面那一段放在<body></body>中就可以看到效果了。