87,995
社区成员




- <html>
- <SCRIPT type=text/javascript><!--
- var i_flash;
- var v_flash;
- // Netscape
- if (navigator.plugins) {
- for (var i=0; i < navigator.plugins.length; i++) {
- if (navigator.plugins[i].name.toLowerCase().indexOf("shockwave flash") >= 0) {
- i_flash = true;
- v_flash = navigator.plugins[i].description.substring(navigator.plugins[i].description.toLowerCase().lastIndexOf("flash ") + 6, navigator.plugins[i].description.length);
- }
- }
- }
- // --></SCRIPT>
- <SCRIPT type=text/vbscript><!--
- //IE
- on error resume next
- set f = CreateObject("ShockwaveFlash.ShockwaveFlash")
- if IsObject(f) then
- i_flash = true
- v_flash = hex(f.FlashVersion())
- end if
- // --></SCRIPT>
- <SCRIPT type=text/javascript><!--
- if (i_flash) {
- document.writeln("你已经安装了Flash插件")
- if (v_flash) {
- document.writeln(" - 版本 " + v_flash);
- }
- } else {
- document.writeln("你没有安装Flash插件")
- }
- // --></SCRIPT>
- <input type="button" onclick="ArgTest(3,4,5)" value="onon">
- </html>
- 注意到这段源码是用Javascript和Vbscript共同构成的,定义了一个i_flash和v_flash,但是困惑的是为什么vbscript那段脚本能对这两个变量进行修改,是因为加了<!-- // -->这些注释符的原因吗? 还有加上这些的具体作用是什么,碰到几回了,本想查下资料,今天就顺带问一下了,若有参考资料更好! 谢谢大家抽空指教!!
<html>
<head>
<title></title>
<script type="text/javascript" language="javascript">
function sayHello(name){
alert("hello "+name);
}
</script>
<script type="text/vbscript" language="vbscript">
sayHello "you"
</script>
</head>
<body>
</body>
</html>