Button That When Clicked Will Display Hidden Column In HTML Table
Quick question. I have a button defined as: A div tag that encloses the following information: echo '
Solution 1:
Wrap your javascript in a window.onload event
window.onload = function () {
var button = document.getElementById('button'); // Assumes element with id='button'
button.onclick = function() {
var div = document.getElementById('content');
if (div.style.display !== 'none') {
div.style.display = 'none';
}
else {
div.style.display = 'block';
}
}
};
Post a Comment for "Button That When Clicked Will Display Hidden Column In HTML Table"