当前位置:网站首页 > 编程语言 > 正文

制作网页的代码(制作网页的代码web)



";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'bs3') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'bs4') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'ag') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'vue2') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'vue3') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}else if(_thisvar == 'fa') {

_html_script_code = "

";

html_editor.getDoc().setValue(_html_script_code + _inithtmlcode);

}

});

});

$('#libs').on('hidden.bs.modal', function () {

$("#sel1 option:first-child").attr('selected', true);

$("#sel1 option:last-child").attr('selected', false);

$("#libs-table tr").removeClass("success");

})

$("#filter").keyup(function() {

_search_value = $(this).val();

//https://api.staticfile.net/libraries

//https://api.cdnjs.com/libraries

$.get('https://api.staticfile.net/libraries',{search:_search_value,fields:"homepage"},function(data) {

var _val_tr ='';

$("#fa-spinner").show();

$.each(data.results, function(i, item) {

if(i

< 10) { _val_tr += ''+item.name+' '+item.latest+'    '; } else { return false; }; }); if(_val_tr) { $("#libs-table").html('库名 地址插入' + _val_tr); } $("#fa-spinner").hide(); }); }); $( document ).ajaxComplete(function() { $("tr").not(':first').hover( function () { if(!$(this).hasClass("success")) { $(this).addClass("warning"); } }, function () { $(this).removeClass("warning"); } ); $("tr").not(':first').click(function() { if(!$(this).hasClass("success")) { _editor_content = html_editor.getValue(); $(this).addClass("success") $(this).removeClass("warning"); _libsrc = $(this).find("td").eq(1).text(); if(_editor_content.indexOf(_libsrc) !== -1 ) { return; } if( _libsrc.indexOf('.js')!==-1 ){ _libsrc = ' '; } else if(_libsrc.indexOf('.css')!==-1) { _libsrc = ' '; } patternBody = / ]*>((.|[ ])*)/im; array_matches_body = patternBody.exec(_editor_content); patternHead = / ]*>((.|[ ])*)/im; array_matches_head = patternHead.exec(_editor_content); if(array_matches_head) { _editor_content = _editor_content.replace('

', _libsrc + '

/head>'); } else if(array_matches_body) { _editor_content = _editor_content.replace('

html>', '

'); } var patternHead = / ]*>((.|[ ])*)/im var array_matches_head = patternHead.exec(src); var patternBodyTag = / ]*)>/im; var array_matches_body_tag = patternBodyTag.exec(src); if (array_matches_body_tag) { src = src.replace('', ''); } } //console.log(css); if (css.indexOf(' '; if (array_matches_head) { src = src.replace('', css + ''); } else if (array_matches_body_tag) { src = src.replace('', css + '

');

} else {

src += css;

}

}

// Javascript

if(js) {

js = '

';

if (array_matches_body_tag) {

src = src.replace('

/body>', js + '

'); }else { src += js; } } text = src; var ifr = document.createElement("iframe"); ifr.setAttribute("frameborder", "0"); ifr.setAttribute("id", "iframeResult"); document.getElementById("output").innerHTML = ""; document.getElementById("output").appendChild(ifr); var ifrw = (ifr.contentWindow) ? ifr.contentWindow: (ifr.contentDocument.document) ? ifr.contentDocument.document: ifr.contentDocument; ifrw.document.open(); ifrw.document.write(text); ifrw.document.close(); autodivheight(); } submitTryit(); window.addEventListener("resize", autodivheight); function autodivheight(){ var winHeight=0; if (window.innerHeight) { winHeight = window.innerHeight; } else if ((document.body) && (document.body.clientHeight)) { winHeight = document.body.clientHeight; } //通过深入Document内部对body进行 检测,获取 浏览器窗口高度 if (document.documentElement && document.documentElement.clientHeight) { winHeight = document.documentElement.clientHeight; } height = height = (winHeight - 60) * 0.86; document.getElementById("splitContainer").style.height= height +"px"; }
到此这篇制作网页的代码(制作网页的代码web)的文章就介绍到这了,更多相关内容请继续浏览下面的相关 推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • 广度优先搜索是递归吗(广度优先搜索是回溯吗)2025-03-03 21:09:10
  • 莫队(莫队是谁)2025-03-03 21:09:10
  • 怎么在文件目录下打开命令窗口(怎么在文件目录下打开命令窗口呢)2025-03-03 21:09:10
  • 腾讯视频会员怎么共享给别人登录(腾讯视频会员怎么共享给别人登录电脑)2025-03-03 21:09:10
  • linux中yum安装(linux安装yum命令)2025-03-03 21:09:10
  • 单播地址是主机地址吗(单播地址和广播地址)2025-03-03 21:09:10
  • 25q32是什么芯片(25q40芯片是干嘛用的)2025-03-03 21:09:10
  • spss24永久许可证代码(spss24永久许可证代码2020)2025-03-03 21:09:10
  • fpp是什么材质(pf什么材料)2025-03-03 21:09:10
  • 国内驾照怎么换国外驾照(国内驾照怎么换国际驾照)2025-03-03 21:09:10
  • 全屏图片