首 页 ┆ 源码下载 ┆ IT学院 ┆ 字体下载 ┆ 模板下载 ┆ 源码发布 ┆ 广告合作 ┆ 网站地图 ┆ 虚拟主机 ┆ 中文域名
► 设为首页
► 加入收藏
► 联系我们
源码下载 >> ASP源码 | PHP源码 | ASP.net源码 | JSP源码 | CGI源码 | VC/C++源码 | VB源码 | Delphi源码 | Flash源码
文章学院 >> 网络编程 | 网页设计 | 图形图象 | 数据库 | 服务器 | 网络媒体 | 网络安全 | 操作系统 | 办公软件 | 软件开发 | 黑客知识
字体下载 >> 精制字体 | 非英字体 | 艺术字体 | 著名字体 | 哥特式 | 简单字体 | 手写体 | 节假日 | 图案字体 | 精度像素 | 中文字体
模板下载 >> 企业门户 | 数码网络 | 休闲娱乐 | 影视音乐 | 旅游名胜 | 文化艺术 | 电子商务 | 个性展示 | 登陆导航 | Flash模板
►►您当前的位置:源码园 → IT学院 → 网络编程 → 其他相关 → 文章内容

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

作者:未知  来源:CSDN  发布时间:2007-2-6 18:17:45
 

<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
</textarea>
<textarea style='display:none' name=xxhelp>
    状态切换(Esc或RightClick)
    运行(F5或Ctrl+Enter)
    帮助(F1)
</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">
</textarea>
</div>

<div id=xxcodediv z-index:1
style="position:absolute;
       top:0;
       left:0;
       width:90%;
       height:100%;
       overflow:none;">
<TEXTAREA id=xxcodearea wrap=off
onscroll='xxlinearea.scrollTop=this.scrollTop;'
onPropertyChange='xxlinenum();'
oncontextmenu='window.event.returnValue=false;xxmenudiv.style.visibility="visible";'
style="border:#ae34f8 solid 0px;
       font-size: 12px; font-family: 宋体;
       width:100%;
       height:100%;
       overflow:auto">
</textarea>
</div>

<DIV ID=xxmenudiv z-index:10
oncontextmenu='window.event.returnValue=false;xxmenudiv.style.visibility="hidden";'
style="background-color:menu;
       filter:alpha(opacity=60);
       position:absolute;
       top:0;
       left:0;
       width:100%;
       height:100%;
       overflow:auto;">
<input onclick='xxmenudiv.style.visibility="hidden";xxrun();'
type=button
value="运行"><p>
<table border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td height=1>
<input onclick='xxmenudiv.style.visibility="hidden"' type=button
value="编辑"><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Undo")'
type=button value='撤销'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Redo")'
type=button value='恢复'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Cut")'
type=button value='剪切'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Copy")'
type=button value='复制'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Paste")'
type=button value='粘贴'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("Delete")'
type=button value='删除'><br>
<input onclick='xxmenudiv.style.visibility="hidden";xxcodearea.focus();document.execCommand("SelectAll")'
type=button value='全选'><br>
    </td>
  </tr>
</table>
<p>
<INPUT TYPE=checkbox id=linebar onclick=xxlinenum()>行号
<p>
<input onclick='xxmenudiv.style.visibility="hidden";window.open(location.href,"","");'
type=button value="新建">
<FORM style="display:inline" action="file:///c|/My Documents/"
method=get target=_blank>
<input onclick='xxmenudiv.style.visibility="hidden"' type="submit"
value='我的文档'></FORM>  
<input onclick='xxmenudiv.style.visibility="hidden";alert(xxabout.value);'
type=button value='关于'>
<input onclick='xxmenudiv.style.visibility="hidden";alert(xxhelp.value);'
type=button value='帮助'>
<p>
<p>
<input type="text" name="xxsource">
<input onclick='xxmenudiv.style.visibility="hidden";window.location="view-source:"+xxsource.value;'
type="button" value='源文件'>
</DIV>

</body>
</textarea>
<!------------------------------>
<object
id=xxclose
type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>

<SCRIPT>
function window.onload()
{
  xxclose.Click()
  var xxclone=window.open("","","resizable=1,status=1")
  xxclone.document.open()
  xxclone.document.write(xxcode.value)
  xxclone.document.close()
}
</SCRIPT>


[] [返回上一页] [打 印]
  • 上一篇文章:对象化JS之----文件上传客户端控制脚本
  • 下一篇文章:类似 MSDN CSDN 左边导航树效果的实现

  • 相关文章:
  • FreeDOS简介
  • Linux+FreeBSD mini-HOWTO
  • freeswan 文档摘录
  • freebsd+apache+mysql+php+phpmyadmin+zend+discuz安...
  • FreeBSD 使用手册
  • [组图]第一次安装freebsd的过程:_)
  • FreeBSD 5.3 to FreeBSD 5.4 binary upgrade
  • 我对freebsd分区的理解
  • FreeBsd
  • 在freebsd上安装linuxigd
  • FREEBSD5.3架站纪实
  • FreeBSD远程操作基础指南
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 源码发布
Copyright © 2003-2009 Ymyasp.Com. All Rights Reserved .
备案序号:粤ICP备07029071号