能看的av_午夜黄色av_在线观看国产视频_天天爱综合_国产精品亚洲成在人线_日韩一

訂閱本欄目 RSS您所在的位置: 深山工作室 > HTML > 正文

一個運行HTML文件的代碼

網頁教學網 2008/3/19 20:40:55 深山行者 字體: 瀏覽 8669

以下是引用片段:

<style type="text/css">
<!--
.sumit1 {width:98%;height:100%;background:#FFFFFF;border:1px solid red;color:red;font-weight:bold;font-size:14px;}
.sumit2 {width:98%;height:100%;background:#FFFFFF;border:1px solid green;color:green;font-weight:bold;font-size:14px;}
.sumit3 {width:98%;height:100%;background:#FFFFFF;border:1px solid blue;color:blue;font-weight:bold;font-size:14px;}
.sumit4 {width:98%;height:100%;background:#FFFFFF;border:1px solid #000;color:#000;font-weight:bold;font-size:14px;}
.sumit5 {width:98%;height:100%;background:#FFFFFF;border:1px solid blue;color:blue;font-weight:bold;font-size:14px;}
.sumit6 {width:98%;height:100%;background:#FFFFFF;border:1px solid #000;color:#000;font-weight:bold;font-size:14px;}
-->
</style>
<script>
//獲取一個對象
function getByid(id) {
 if (document.getElementById) {
  return document.getElementById(id);
 } else if (document.all) {
  return document.all[id];
 } else if (document.layers) {
  return document.layers[id];
 } else {
  return null;
 }
}


//運行框操作
function creatID(DivID){
var objs=getByid(DivID).getElementsByTagName('textarea');
var inps=getByid(DivID).getElementsByTagName('input');
var buts=getByid(DivID).getElementsByTagName('button');
var labs=getByid(DivID).getElementsByTagName('label');
 for (i=0; i<objs.length; i++) {
  objs[i].id="runcode"+i;
  inps[i].id=i
  buts[i].id=i
  labs[i].id=i
 }
}
function runCode(obj){  //定義一個運行代碼的函數,
   var code=getByid("runcode"+obj).value;//即要運行的代碼。
   var newwin=window.open('','','');  //打開一個窗口并賦給變量newwin。
   newwin.opener = null // 防止代碼對論談頁面修改
   newwin.document.write(code);  //向這個打開的窗口中寫入代碼code,這樣就實現了運行代碼功能。
   newwin.document.close();
}

//復制代碼
function doCopy(obj) {
 if (document.all){
   textRange = getByid("runcode"+obj).createTextRange();
   textRange.execCommand("Copy");
   alert("代碼已經復制到剪切板");
 }else{
   alert("此功能只能在IE上有效\n\n請在文本域中用Ctrl+A選擇再復制")
 }
}
//另存代碼
function saveCode(obj) {
        var winname = window.open('','','width=0,height=0,top=200,left=200px');
        winname.document.open('text/html', 'replace');
        winname.document.write(obj.value);
        winname.document.execCommand('saveas','','純CSS簡潔TAB.html');
        winname.close();
}

//剪切代碼
function cut(obj) {
 if (document.all){
   textRange = getByid("runcode"+obj).createTextRange();
   textRange.execCommand("cut");
   alert("代碼已經剪切到剪切板");
 }else{
   alert("此功能只能在IE上有效\n\n請在文本域中用Ctrl+A選擇再剪切")
 }
}

//粘貼代碼
function paste(obj) {
 if (document.all){
   textRange = getByid("runcode"+obj).createTextRange();
   textRange.execCommand("paste");
   alert("粘貼代碼");
 }else{
   alert("此功能只能在IE上有效\n\n請在文本域中用Ctrl+v選擇再粘貼")
 }
}
</script>

 <table width="100%" border="0" cellpadding="0" cellspacing="0">
 <form name=form1>
   <tr>
     <td height="530" colspan="6"><textarea name="text" id="runcode0" cols="72" rows="9" style="width:100%;height:98%;"> </TEXTAREA></td>
    </tr>
   <tr>
     <td height="53"><input type="button" value="運行代碼" id="0" onClick="runCode(this.id)" class="sumit1"></td>
     <td><input type="button" value="保存代碼" id="0" onClick="saveCode(runcode0)" class="sumit2"></td>
     <td><input type="button" value="復制代碼" id="0" onClick="doCopy(this.id)" class="sumit3"></td>
     <td><input type="button" value="剪切代碼" id="0" onClick="cut(this.id)" class="sumit4"></td>
     <td><input type="button" value="粘貼代碼" id="0" onClick="paste(this.id)" class="sumit5"></td>
     <td><input type="button" value="清空代碼" id="0" onClick="document.form1.text.value='';" class="sumit6"></td>
   </tr>
  </form>
 </table>
 

 

 

 


相關閱讀
非常不錯的支持各種瀏覽器的簡易調色板
uni-app基礎知識數據綁定
給個photoshopcs下載地址,大家可能用到
劉瀏家俱
另類的title提示文字
旅行社手機網站默認模板
asp論壇制作教程(二)——asp論壇制作文件關系發析
旅行社網站模板3
共有0條關于《一個運行HTML文件的代碼》的評論
發表評論
正在加載評論......
返回頂部發表評論
呢 稱:
表 情:
內 容:
評論內容:不能超過 1000 字,需審核,請自覺遵守互聯網相關政策法規。
驗證碼: 驗證碼 
網友評論聲明,請自覺遵守互聯網相關政策法規。

您發布的評論即表示同意遵守以下條款:
一、不得利用本站危害國家安全、泄露國家秘密,不得侵犯國家、社會、集體和公民的合法權益;
二、不得發布國家法律、法規明令禁止的內容;互相尊重,對自己在本站的言論和行為負責;
三、本站對您所發布內容擁有處置權。

更多信息>>欄目類別選擇
百度小程序開發
微信小程序開發
微信公眾號開發
uni-app
asp函數庫
ASP
DIV+CSS
HTML
python
更多>>同類信息
dw里面查找替換使用正則刪除sqlserver里面的CONSTRAINT
javascript獲取瀏覽器指紋可以用來做投票
火狐Mozilla Firefox出現:無法載入您的Firefox配置文件 它可能已經丟失 或是無法訪問 問題解決集合處理辦法
DW設置之后更好用 DreamweaverCS編輯GB2312與UTF-8文件在代碼視圖中點擊鼠標錯位問題的解決辦法
js指定日期加n天加n月加n年
jquery中動態生成的代碼使用on hover事件時不出現效果
更多>>最新添加文章
dw里面查找替換使用正則刪除sqlserver里面的CONSTRAINT
Android移動端自動化測試:使用UIAutomatorViewer與Selenium定位元素
抖音直播音掛載小雪花 懂車帝小程序
javascript獲取瀏覽器指紋可以用來做投票
火狐Mozilla Firefox出現:無法載入您的Firefox配置文件 它可能已經丟失 或是無法訪問 問題解決集合處理辦法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路徑
python通過代碼修改pip下載源讓下載庫飛起
python里面requests.post返回的res.text還有其它的嗎
更多>>隨機抽取信息
旅行社線路主題默認模板5
中小企業網站優化存在的弊病
深山旅行社管理系統免費版 V2.3
百度蜘蛛飼養技巧
如何讓文本框不出現提交過的表單信息
北京神舟國際旅行社集團有限公司
主站蜘蛛池模板: 一级一级黄色片 | 欧美日韩亚洲国产综合 | 日韩视频在线一区二区 | www.亚洲 | 欧美一区2区三区4区公司二百 | 91久久国产综合久久 | 欧美一区二区三区在线看 | 日韩中文视频 | 久草视频国产 | 中文字幕在线第二页 | 日本天天操 | 亚洲精品国产电影 | 日韩中文字幕在线免费观看 | 欧美性生活视频 | 一级一片免费视频 | 欧美视频三区 | 亚洲精品久久久久999中文字幕 | 国产精品久久久久久久久福交 | 一区在线视频 | 久久国内精品 | 成人免费视频观看视频 | 成人精品在线观看 | 一区二区在线视频 | 久久亚洲一区 | 久久91精品国产91久久跳 | 中文字幕一区二区三 | av中文字幕在线播放 | 精品国产黄a∨片高清在线 激情网站免费 | 国产乱肥老妇国产一区二 | 免费看的av | 国产激情在线 | 亚洲欧美在线观看 | 一级a毛片| 91午夜精品 | 一区二区三区中文字幕 | 99精品国产在热久久 | 免费国产在线视频 | 蜜臀网| 国产人久久人人人人爽 | 黄色片在线免费观看 | 欧美日韩高清在线一区 |