elwell
08-09-2003, 04:51 PM
I have this code generator and i would like to be able to use tags like script and html and stuff but i cant just put the in " " . Does anyone know a way to write tags like those and have them appear as text.
<html><head><title>Javascript and Html Code Generators</title>
<script type="text/javascript">
function makealert() {
document.getElementById('alertoutput').value = "alert('" +document.getElementById('alertinput').value +"')";
}
</script>
</head>
<body>
Alert Generator. What do you want it to say?<br />
<input type="textbox" name="alertinput" id="alertinput" />
<input type="button" onClick="makealert()" value="Generate" />
<br />
Code:<br /><textarea name="alertoutput" id="alertoutput" rows="5" cols="30">CODE</textarea>
</body>
</html>
<html><head><title>Javascript and Html Code Generators</title>
<script type="text/javascript">
function makealert() {
document.getElementById('alertoutput').value = "alert('" +document.getElementById('alertinput').value +"')";
}
</script>
</head>
<body>
Alert Generator. What do you want it to say?<br />
<input type="textbox" name="alertinput" id="alertinput" />
<input type="button" onClick="makealert()" value="Generate" />
<br />
Code:<br /><textarea name="alertoutput" id="alertoutput" rows="5" cols="30">CODE</textarea>
</body>
</html>