内容显示页
 
类别:JavaScript | 浏览(139) | 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
 
 
相关链接
 
网友评论:
姓名: 记住我
网址:
邮箱:
内容:
验证码:  验证码图片看不清? 换张图试试
 
   
 
 
文章分类
 
   

power by :柳永法(yongfa365)'Blog | model by :hibaidu | css by:众网友 | 京ICP备07011491号   我要统计  

本空间赞助商:北京中科兴联信息技术有限公司

QQ:64049027    E-mail:64049027<at>qq.com