I am having some trouble here. I am developing a button that once selected will run a JavaScript function - ShowColumn() - that will make a table column appear. The table column will at first be hidden - "display:none;" - but once the user selects the button the table column that is hidden will then appear/will be visible. Can this be done? And if so please can someone help? Thanks :)
I have included what I have done so far, as follows:
<html>
<head>
<script type="text/Javascript">
function ShowColumn(){
document.getElementById("hiddenColumn").style.display = "";
}
</script>
</head>
<body>
<button onClick="ShowColumn()"></button>
<table>
<tr>
<td>
<textarea>Write something here....</textarea>
</td>
<td id="hiddenColumn" style="display:none;">
<textarea>Write something here....</textarea>
</td>
</tr>
</table>
</body>
</html>
I have done a lot of research and I haven't come up with any solution to my problem. Can this be done with JavaScript and HTML alone? Or do I have to incorporate another language into the system in order to make the hidden column visible? Any help would be highly appreciated! Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire