My drop down List to select particular value-
You ar creating a nodeList
(a special array of Nodes) using getElementsByClassName
. Alternatively you can use document.querySelector
, which returns the first element with className .catlink
:
function showDiv( discselect ) {
if( discselect === 1) {
document.querySelector(".catlink").innerHTML = "aaaaaaqwerty";
}
}