The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
JavaScript - onmousedown
I am new to JavaScript, and I am playing with this line of code that to my knowledge is correct but it will not run. The code is:
<body onmousedown="document.bgcolor='#0000CC'"> I press the left mouse button down and it doesn't work; any ideas as to why? |
#2
|
|||
|
|||
without checking I believe the function is onMouseDown not onmousedown. Javascript functions are case senstive.
|
#3
|
|||
|
|||
I have this <body onMouseDown="document.bgcolor='blue'"> and it still isn't changing the bgcolor. Anyone know why that is?
|
#4
|
||||
|
||||
Code:
function updateBody() { document.getElementsByTagName('body')[0].style.background = 'blue'; } document.getElementsByTagName('body')[0].onmousedown = updateBody; |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|