javascript W3Schools 试用版编辑器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5678787/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
W3Schools Try-it Editor
提问by weardstuff
Does anyone know how to get, or where to get, or how to make, or where to find a tutorial, about the w3schools try it editor?
有谁知道如何获得,或从哪里获得,或如何制作,或在哪里可以找到有关w3schools try it 编辑器的教程?
I need an editor like it, so when typing js/html/css the code be accepted and shown like the tryit editor.
我需要一个像它这样的编辑器,所以当输入 js/html/css 时,代码被接受并像 tryit 编辑器一样显示。
回答by Naftali aka Neal
If I understand that correctly, you're looking for a Javascript or PHP editor?
如果我理解正确,您正在寻找 Javascript 或 PHP 编辑器?
For JS I use jsfiddle.net, and for PHP I use codepad.org.
对于 JS 我使用jsfiddle.net,对于 PHP 我使用codepad.org。
回答by mario
The "editor" you are referring to is nothing more but:
您所指的“编辑器”无非是:
<form action="<?= $_SERVER["PHP_SELF"] ?>" method="POST">
<input type="submit">
<textarea name="code"><?= htmlentities($_POST["code"]) ?></textarea>
<div id="output">
<?= $_POST["code"] ?>
</div>
And the PHP form sending could even be replaced by:
PHP 表单发送甚至可以替换为:
<button onclick='$("#output").html( $("textarea#code").value )'>
回答by coryvb123
Your question wasn't super clear, but it sounds like you're asking for another tool similar to the W3Schools Tryit Editor.
你的问题不是很清楚,但听起来你是在要求另一个类似于W3Schools Tryit Editor 的工具。
I use http://jsfiddle.net/, and I love it. It lets you quickly add HTML, JS, and CSS to the editor and get the results. It also lets you save/share your code with others. It's great for mocking up something quick and sending it out to get approved or to get help with syntax.
我使用http://jsfiddle.net/,我喜欢它。它可以让您快速将 HTML、JS 和 CSS 添加到编辑器并获得结果。它还可以让您保存/与他人共享您的代码。它非常适合快速模拟某些内容并将其发送出去以获得批准或获得语法方面的帮助。