html5 - How to implement this code display function?
淡淡烟草味
淡淡烟草味 2017-06-21 10:12:03
0
3
890

I want to know how to create such a web page with html js on the left and display on the right?
What is its principle?

I downloaded wp fiddle and found that it cannot be used in my latest version of wordpress. I want to implement it myself.

When submitting the code, a submitTryit() function is triggered. This function is very simple

function submitTryit()
{
var t=document.getElementById("TestCode").value;
t=t.replace(/=/gi,"w3equalsign");
t=t.replace(/script/gi,"w3scrw3ipttag");
document.getElementById("code").value=t;
document.getElementById("tryitform").action="v.asp";
validateForm();
document.getElementById("tryitform").submit();
}
function validateForm()
{
var code=document.getElementById("code").value;
if (code.length>5000)
    {
    document.getElementById("code").value="<h1>Error</h1>";
    }
}
淡淡烟草味
淡淡烟草味

reply all(3)
世界只因有你

On the left is a form. When writing code, the right side is iframe, and the target of the code form on the left is set to the right iframe just

为情所困

This page uses iframe, see the picture below

ringa_lee

The left p#contenteditable, the right p.html(contenteditable.html())won’t work?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!