|
 |
17³â Àü |
<html>
<head>
<title>HTML-JS »ý¼º±â</title>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<style type="text/css">
th,td { font-family: µ¸¿ò; font-size: 9pt; }
textarea { font-family: Fixedsys; }
</style>
<script language="javascript">
function generateSource(form) {
var strContent = form.HTML.value;
strContent = strContent.replace(/\\/g, "\\\\");
strContent = strContent.replace(/\"/g, "\\\"");
strContent = strContent.replace(/(\r{0,1})\n/g, "\\n\\\n");
strContent = strContent.replace(/<\/script>/gi, "<\/\",\"script>");
var strResult = "<script language=javascript>\ndocument.write(\"\\\n" + strContent + "\");\n</" + "script>";
form.JSSRC.value = strResult;
return false;
}
function showResult(form, src) {
var wopt = "menubar=yes,toolbar=yes,location=yes,scrollbars=yes,status=yes,resizable=yes";
switch (true) {
case form.size[1].checked: wopt += ",width=640,height=480"; break;
case form.size[2].checked: wopt += ",width=800,height=600"; break;
case form.size[3].checked: wopt += ",width=1024,height=768"; break;
}
winResult = window.open("about:blank","",wopt);
winResult.document.open("text/html", "replace");
switch (src) {
case "html": winResult.document.write(form.HTML.value); break;
case "js": winResult.document.write(form.JSSRC.value); break;
}
winResult.document.close();
return false;
}
</script>
</head>
<body style="margin:0px" onLoad="document.mainform.HTML.focus()">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="4" bgColor="lightgrey">
<form name="mainform" onSubmit="return generateSource(this)">
<tr height="20">
<th align="left" colspan="2">¢Æ HTML-JS »ý¼º±â</th>
</tr>
<tr height="10">
<th width="50%">´ë»ó HTML ¼Ò½ºÄÚµå</th>
<th width="50%">HTML Ãâ·Â¿ë JS ¼Ò½ºÄÚµå</th>
</tr>
<tr>
<td width="50%"><textarea name="HTML" style="width:100%;height:100%"></textarea></td>
<td width="50%"><textarea name="JSSRC" readonly style="width:100%;height:100%"></textarea></td>
</tr>
<tr height="20">
<td colspan="2">
<input type="submit" value="JS ¼Ò½ºÄÚµå »ý¼º" onClick="this.form.HTML.focus()">
<input type="button" value="HTML ¹Ì¸®º¸±â" onClick="showResult(this.form,'html');this.blur()">
<input type="button" value="JS ½ÇÇà°á°ú" onClick="showResult(this.form,'js');this.blur()">
°á°úâ Å©±â:
<input type="radio" name="size" checked>񃧯
<input type="radio" name="size">640x480
<input type="radio" name="size">800x600
<input type="radio" name="size">1024x768
</td>
</tr>
</form>
</table>
</body>
</html> |
|
̵̧ : 295 |
̵̧
¸ñ·Ï
|
|