how does one pass the specific array number to a function with the onclick? I have 5 different elements in my array such as jvar[0], jvar[1], etc. I wish to bring up one of these when I use the onclick.
<script>
myArr = new Array ("message 1", "Message 2"
function myFunction(inNum){
alert (myArr[inNum])
}
</script> -----------------------------------------------------------------
"The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'."
- unknown
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.