need to display textarea after clicking label
Posted
by
Otero
on Stack Overflow
See other posts from Stack Overflow
or by Otero
Published on 2012-11-28T11:02:11Z
Indexed on
2012/11/28
11:03 UTC
Read the original article
Hit count: 241
JavaScript
|html
When I click on a label, just below that some TextArea should be displayed with some predefined text in it and the user shouldn't able to modify the TextArea's content.
This is how I tried :
<html>
<head>
<script type="text/javascript">
function myfunc2() {
document.getElementById('showthis').style.visibility="visible"
}
</script>
</head>
<body>
<label onclick="myfunc2()">Click here</label>
<textarea id="showthis" style="display:none">dfdsfsfasdfdsfsfasdfssdfsfasf</textarea>
</body>
</html>
iam new to this html and javascript.. pls someone help me on this..
© Stack Overflow or respective owner