There are some js syntax on Event handling which i am not familiar, what could be wrong with the codes below? The words are suppose to change when the mouse move in & out...
<head>
<style>
#bannertext {font-family:"Verdana ";}
</style>
<script language="javas cript">
// Not sure if the below syntax is correct?
function changeColor(ele ment,color){
element.style.c olor=color;
}
function changeCursor(el ement,cursor){
element.style.c ursor="hand";
}
function changeContent(e lement,content) {
element.style.c ontent=content;
}
function changeSize(elem ent, size){
element.style.s ize=size;
}
</script>
</head>
<body>
<!-- I know below codes contain multiple mouse events within a single span & erranous but not sure how to write them -->
<SPAN id="bannertext " onmouseout="cha ngeColor(#banne rtext,'blue'); changeContent(b annertext, 'Click me...'); changeSize(bann ertext, 20);"
onmouseover="ch angeText(banner text,'red'); changeContent(# bannertext, 'Do not Click Me');changeSize (bannertext, 30); changeCursor(th is)";
onclick="clickT ext(bannertext, 'green'); changeContent(# bannertext, 'Some text');changeSi ze(bannertext, 50)";>
Click here to proceed...
</SPAN>
<head>
<style>
#bannertext {font-family:"Verdana ";}
</style>
<script language="javas cript">
// Not sure if the below syntax is correct?
function changeColor(ele ment,color){
element.style.c olor=color;
}
function changeCursor(el ement,cursor){
element.style.c ursor="hand";
}
function changeContent(e lement,content) {
element.style.c ontent=content;
}
function changeSize(elem ent, size){
element.style.s ize=size;
}
</script>
</head>
<body>
<!-- I know below codes contain multiple mouse events within a single span & erranous but not sure how to write them -->
<SPAN id="bannertext " onmouseout="cha ngeColor(#banne rtext,'blue'); changeContent(b annertext, 'Click me...'); changeSize(bann ertext, 20);"
onmouseover="ch angeText(banner text,'red'); changeContent(# bannertext, 'Do not Click Me');changeSize (bannertext, 30); changeCursor(th is)";
onclick="clickT ext(bannertext, 'green'); changeContent(# bannertext, 'Some text');changeSi ze(bannertext, 50)";>
Click here to proceed...
</SPAN>
Comment