jackson jackson - 5 months ago 42
CSS Question

show contents of textarea to a div

I want to make a textarea to show its content to a div by a clicking a button. I wrote a simple code that it sees for short time in div but it disappears in div and textarea quickly.

how can I correct it, for now I’m only designing the page and I want to make style for answer so I need to see content in div without connect it to server.

<textarea class="inBox"></textarea><button class="btn">Send</button>

Code link: jsfiddle

Answer Source

Add return false; to the end of your method to prevent post action or change inputs type to button.

Your problem is in reload form by submit button click.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download