<div id = "yourElement"></div>
<script>
var yourElement = document.getElementById("yourElement"); //get the element
yourElement.oncontextmenu = function () {
//oncontextmenu triggered!
}
yourElement.onmousedown = function () {
//onmousedown triggered!
}
yourElement.onload = function () {
//onload triggered!
}
//ecc..
</script>
EDIT:
here's my fiddle: http://jsfiddle.net/durZL/
Note: if you put the script in the header you should tell to the javascript to run the code when the page is fully loaded, or else you are not able to get the element,
jQuery already does this for you, but if don't want to use it this is the right way to do it:
window.onload = function () {
//here is the code that will run after the page is fully loaded
//DOM elements can be safely manipulated here
}