HTML Code Runner - Online HTML Editor & Executor
<!DOCTYPE html>
<html>
<head>
<title>HTML Code Runner - Online HTML Editor & Executor</title>
<style>
textarea {
width: 100%;
height: 200px;
font-size: 16px;
}
button {
margin-top: 10px;
padding: 10px 20px;
font-size: 16px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>HTML Code Runner</h1>
<p>Paste your HTML code in the text area below and click on the 'Run Code' button to see the result.</p>
<textarea id='htmlCode'></textarea>
<button onclick='runCode()'>Run Code</button>
<div id='result'></div>
<script>
function runCode() {
var html = document.getElementById('htmlCode').value;
document.getElementById('result').innerHTML = html;
}
</script>
</body>
</html>
<!-- This code allows you to input HTML code in a text area and then run it to see the output in a div section. -->
原文地址: https://www.cveoy.top/t/topic/lsuB 著作权归作者所有。请勿转载和采集!