内容显示页
 
类别:JavaScript | 浏览(260) | 2006-11-28 11:02:00

function trim(inputString)
{
    return inputString.replace(/^ +/,"").replace(/ +$/,"");
}

function copycode(obj)
{
    var rng = document.body.createTextRange();
    rng.moveToElementText(obj);
    rng.scrollIntoView();
    rng.select();
    rng.execCommand("Copy");
    rng.collapse(false);
}


function runCode(obj)
{
    var winname = window.open('', "_blank", '');
    winname.document.open('text/html', 'replace');
    winname.opener = null // 防止代码对论谈页面修改
    winname.document.write(obj.value);
    winname.document.close();
}


function saveCode(obj)
{
    var winname = window.open('', '_blank', 'top=10000');
    winname.document.open('text/html', 'replace');
    winname.document.write(obj.value);
    winname.document.execCommand('saveas','','code.htm');
    winname.close();
}


function showflash(flashURL,flashWIDTH,flashHEIGHT)
{
    var flashURL=flashURL;
    var flashWIDTH=flashWIDTH;
    var flashHEIGHT=flashHEIGHT;
    document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>');
    document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">');
    document.writeln ('<PARAM NAME=wmode VALUE=transparent>');
    document.writeln ('<PARAM NAME=loop VALUE=true>');
    document.writeln ('<PARAM NAME=quality VALUE=high>');
    document.writeln ('<EMBED src="'+flashURL+'" loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
    document.writeln ('</OBJECT>');
}


引用本页地址:http://www.yongfa365.com/item/3ed9361a32897ca5.html
 
 
相关链接
 
网友评论:
姓名: 记住我
网址:
邮箱:
内容:
验证码:  验证码图片 看不清? 换张图试试
 
     
 
 
文章分类
 
 
.Net + C#(73)
 
 
ASP+VBS(161)
 
 
 
Linux(10)
 
 
 
web 2.0(26)
 
 
 
 
 
心程(68)
 
生活(97)
 
 
     

Power by :柳永法(yongfa365)'Blog  | 京ICP备07011491号  QQ:64049027  E-mail:64049027@qq.com yongfa365'CodePlex yongfa365'CodeGoogle

申请友情链接 要求:跟本站主题相类似正规网站,双方交换为首页位置

转载请注明来源,以便后人及时得到最新、修正、加强版!!!