js replace dom element in html

龙承德
2023-12-01

step 1.

new a html file

 

<html>
<head>
<link type="text/css" href="example.css" rel="stylesheet" />
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script language="javascript" type="text/javascript" src="example.js"></script>
<div>your dom elements</div>
</html>

 

 

step 2.

new a js file name example.js. following is the simple code

 

var mydom = "here am i";

document.writ(mydom);

//padding-right:18px; is so useful

 类似资料:

相关阅读

相关文章

相关问答