Home > front end >  This problem I don't know how much difficult to VB pro! Know that come in, please?
This problem I don't know how much difficult to VB pro! Know that come in, please?

Time:09-16

The great god, I met with technical problems, the website online within VB code compiler function is how to implement? Turn to the great god!

CodePudding user response:

You may have any misunderstanding for JavaScript

CodePudding user response:

reference 1/f, d hand response:
you might have any misunderstanding for JavaScript
?

CodePudding user response:

On the left side of the editor right iframe not line

CodePudding user response:

That which is VBS ah

CodePudding user response:

Title to write so exaggerated, lead to see the person many, will be the one who is definitely a lot, but usually not care you, now that was dug grave dug out, I was at the time to answer it,
General principle is to give a text boxes, let users can input the HTML source code, when click "run the code", call the iframe document. The write method to write the HTML source code of the user to the iframe,
 & lt; ! DOCTYPE html> 


<meta charset="utf-8"/& gt;
TestJs
<style type="text/CSS" & gt;
The button {
Width: 120 px;
height: 30px;
Margin - bottom: 8 px;
}
Div {
Width: 820 px;
Height: 400 px;
}
Textarea {
Width: 400 px;
Height: 400 px;
float: left;
Margin - right: 6 px;
}
The iframe {
Width: 400 px;
Height: 400 px;
float: left;
}
</style>
Var HTML=` & lt; ! DOCTYPE html>


<meta charset="utf-8"/& gt;
TestJs

<body>



`;
Window. The onl oad=function () {
Var txtHtml=document. GetElementById (' txtHtml ');
txtHtml.value=https://bbs.csdn.net/topics/html;
BtnOK_click ();
}
The function btnOK_click () {
Var iframe1=document. GetElementById (' iframe1 ');
Var txtHtml=document. GetElementById (' txtHtml ');
Var. Doc=iframe1 contentWindow. Document;
Doc. The open ();
Doc. Write (txtHtml. Value);
Doc. The close ();
}
</script>

<body>