This cross-browser method allows us to quickly get a "handle" on our HTML element.
If we imagined a world where we could grab an element with a simple and easy-to-remember syntax just by sending the element's ID attribute, we would be dreaming of MooTools.
<script type="text/javascript"
src="mootools-1.3.0.js"></script>
</head>
<body>
<div id="my_trigger"
style="width:100px; height:100px;
border:1px solid #BEBEBE;
line-height:50px; text-align:center;">You Found Me!</div>
<noscript>JavaScript is disabled.</noscript>
<script type="text/javascript"> // raw javascript's familiar method, not cross-browser use // var my_element = document.getElementByID('my_target'); // MooTools uses the $ object to grab elements by ID var my_element = $('my_trigger'); var my_element_text = my_element.get('text'); alert...