下面请跟着图老师小编一起来了解下JavaScript TO HTML 转换,精心挑选的内容希望大家喜欢,不要忘记点个赞哦!
【 tulaoshi.com - Web开发 】
html
head
titleJavaScript TO HTML 转换/title
meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
link href="style.css" rel="stylesheet" type="text/css" /
/head
body
div class="menu_head"JavaScript TO HTML 转换/div
div class="content"
div请在下边输入JavaScript代码:/div
div
textarea name="textarea" style="width:99%" rows="15" id="oResult" ondblclick="this.select();oResult.createTextRange().execCommand('Copy')" onpropertychange="rechange()" onChange="rechange()"/textarea
/div
BR /
div以下是经过转换后的HTML代码:/div
div
textarea name="textarea2" style="width:99%" rows="15" id="Re" ondblclick='this.select();this.createTextRange().execCommand("Copy")'/textarea
/div
/div
SCRIPT LANGUAGE="JavaScript"
!--
function rechange()
{
Re.value=oResult.value.replace(/document.writeln("/g,"").replace(/");/g,"").replace(/"/g,""").replace(/'/g,"'").replace(///g,"/").replace(/\/g,"")
}
//--
/SCRIPT/body/html
来源:http://www.tulaoshi.com/n/20160219/1602445.html
看过《JavaScript TO HTML 转换》的人还看了以下文章 更多>>