|
查看: 1235|回复: 5
|
[求助]Java Newbie
[复制链接]
|
|
|
大家好~本人这个学期开始学HTML/Css 和Java,在Java方面还不是很明白
请问各位有没有类似http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro里面允许edit然后show result的Java/其他程式语言的教学网站
感激不尽 |
|
|
|
|
|
|
|
|
|
|
发表于 8-2-2010 11:21 AM
|
显示全部楼层
回复 1# WaterBird90
learn the html tag --> form, textarea and iframe plus PHP is enough to create simple tryIt editor like w3schools:
index.html:
<html>
<head>Try it Editor</head>
<body>
<form method="post" action="main.php" target="result">
<b>Welcome to TryIt Application</b>
<br>
<input type="submit" value="Edit and Click Me " name="getResult" id="getResult"/><br>
<table>
<tr><td>
<textarea rows="23" cols="42" id="source" name="source">
<html>
<body>
<h1>hahahaha</h1>
</body>
</html>
</textarea>
</td><td>
<iframe id="result" src="main.php" height="350px" name="result"></iframe>
</td></tr></table>
</form>
</body>
</html>
PHP, main.php:
<?php
if(isset($_POST["getResult"])){
echo $_POST["source"];
}else{
echo "<h1>hahahaha</h1>";
}
?>
That's it. Please install apache to run the PHP apps |
|
|
|
|
|
|
|
|
|
|
发表于 8-2-2010 11:37 AM
|
显示全部楼层
本帖最后由 MaokeJackson 于 8-2-2010 11:39 AM 编辑
JavaScript和Java是完全不同的東西,請先搞清楚這一點!
要show result請用相應的IDE。 |
|
|
|
|
|
|
|
|
|
|
发表于 11-2-2010 09:01 PM
|
显示全部楼层
看看 3# 的
若是IDE
我建议Netbeans IDE |
|
|
|
|
|
|
|
|
|
|
发表于 14-2-2010 05:24 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 14-2-2010 05:57 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|