js和flash相关的用法

js动态改变flash尺寸大小

<script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
            var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string. 
            var xiSwfUrlStr = "${expressInstallSwf}";
            var flashvars = {};
           	flashvars.vid = "_o6KtpZ_0IfLaK1_RHcnfA..";
            
            var params = {};
            params.quality = "high";
            params.bgcolor = "${bgcolor}";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id = "${application}";
            attributes.name = "${application}";
            attributes.align = "middle";
            swfobject.embedSWF(
                "${swf}.swf", "flashContent", 
                "${width}", "${height}", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
            
            function setSize(width, height)   
			{   
				document.getElementById("${application}").width = width;   
				document.getElementById("${application}").height = height;   
			} 

        </script>


location.href

用于获取当前文档(浏览器地址栏)的URL或设置URL。如果设置URL,将导航到新的页面.


navigator.userAgent

属性判断用户使用的浏览器与操作系统


document.referrer

判断访客来源网址

例如从http://localhost/test/1.html点击按钮,跳转到http://www.shen100.com

那么document.referrer为http://localhost/test/1.html


document.title

当前页面的标题,如<title>test</title>, 此时document.title为test





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值