How do you insert html tags text in Jscript?

Alexei

New member
I need to create a script that gives html code after a text input.Basic code:

<div id=instr>
What you type in below will replace this text.
If you type nothing in the box, but simply click the button, you will delete the text.</div>
<br>
<form>
<div id=name> Full name </div>
<input id=T1 type=text style="width: 400">
<div id=code1>
<p>
<script>
function clicked()
{
code1.innerHTML = T1.value
}
</script>
<input type=button value="Click me to Change" onclick=javascript:clicked()></p>
</form>

I need the code to input html tags before and after the user inserted text. Desired shown effect on page: "<html tag> userinput text2".
I'm new to Jscript coding so I'm struggling a bit.
 
Back
Top