Freeonline在线编辑器(自由软件)[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 bxxxr 的 blog

<textarea id=xxcode style='width:100%;height:100%'>
<textarea style='display:none' name=xxabout>
    freeonline[version8],copyright(c)2003,bxxxr
    本程序是自由软件,遵循gpl,没有任何担保。详细情况请参阅gnu通用公共许可证。http://www.gnu.org/
    本程序是用javascript在网吧里写的。(98se ie5 cr1g 128m)它的基本用途是在线编写脚本程序,还有一些小功能。
    email:bxxxr@yahoo.com.cn
&lt;/textarea>
<textarea style='display:none' name=xxhelp>
    状态切换(esc或rightclick)
    运行(f5或ctrl+enter)
    帮助(f1)
&lt;/textarea>
<script>
function window.onbeforeunload(){
if (event.clienty<0 && event.clientx>document.body.clientwidth-20
 || event.clienty<0 && event.clientx<20
 || event.altkey
 || event.clienty>document.body.clientheight)
 event.returnvalue='exit freeonline ?'
}

function window.onload()
{
  document.title=xxabout.value
  self.moveto(-4,-4)
  self.resizeto(screen.availwidth+8,screen.availheight+8)
  xxcodearea.select()
  xxsource.value=window.location.href
  xxmenudiv.style.visibility="visible"
  linebar.checked=1
  xxlinenum()
}

function xxrun()
{
  xxwww=xxcodearea.value;
  xxrrr=open('','','');
  xxrrr.document.open();
  xxrrr.document.write(xxwww);
  xxrrr.document.close();
}

function document.onkeydown()
{
  if(event.ctrlkey&&event.keycode==13)
  {
    xxrun()
  }
  else if(event.keycode==116)
  {
    event.keycode=0
    event.returnvalue=false
    xxrun()
  }
  else if(event.keycode==27)
  {
    event.keycode=0
    event.returnvalue=false
    if(xxmenudiv.style.visibility=="visible")
    {
      xxmenudiv.style.visibility="hidden"
    }
    else if(xxmenudiv.style.visibility=="hidden")
    {
      xxmenudiv.style.visibility="visible"
    }
  }
}

function document.onhelp()
{
  alert(xxhelp.value)
  return false
}

function xxlinenum()
{
  if(linebar.checked)
  {
    xxlinediv.style.visibility="visible"
    var xxthenum=xxcodearea.value
    xxthenum=xxthenum.split('\n')
    xxthenum=xxthenum.length
    xxlinearea.cols=xxthenum.tostring().length
    xxcodediv.style.left=xxlinediv.clientwidth
    xxcodediv.style.width=document.body.clientwidth-xxlinediv.clientwidth

    xxlinearea.value=''
    var xxc=1
    while(xxthenum!=xxc-1)
    {
      var xxc1=xxthenum.tostring().length-xxc.tostring().length
      while(xxc1!=0)
      {
        xxlinearea.value=xxlinearea.value+'0'
        xxc1--
      }
      xxlinearea.value=xxlinearea.value+xxc
      xxc++
    }
  }
  else
  {
    xxlinediv.style.visibility="hidden"
    xxcodediv.style.left=0
    xxcodediv.style.width=document.body.clientwidth
  }
}
</script>

<body bgcolor=menu style=border:none scroll=no topmargin=0 leftmargin=0>
<div id=xxlinediv z-index:1
style="position:absolute;
       top:0;
       left:0;
       height:100%;
       overflow:none;">
<textarea id=xxlinearea readonly
style="background-color:menu;
       border:#ae34f8 solid 0px;
       font-size: 12px; font-family: 宋体;
       height:100%;
       overflow:hidden">
&lt;/textarea>
</div>

<div id=xxcodediv z-index:1
style="position:absolute;
       top:0;
       left:0;
       width:90%;
       height:100%;

本文关键:本程序是用JavaScript在网吧里写的。它的基本用途是在线编写脚本程序。
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top