04-23-2009, 05:28 PM
|
#19 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Hey guys, quick question, this goes a little back when Salathe suggested to use onLoad in the Body tag...
Here's what I currently have and it works...
shortened code:
Code:
<body>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="radio" name="radio" /></div>
<div><input type="radio" name="radio" /></div>
<div><input type="radio" name="radio" /></div>
<script type="text/javascript">
<!--
showCount();
// -->
</script>
</body>
I move the function to be an onLoad event in the BODY tag and it works too...is this considered best practice?
Code:
<body onLoad="showCount();">
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="radio" name="radio" /></div>
<div><input type="radio" name="radio" /></div>
<div><input type="radio" name="radio" /></div>
</body>
|
|
|
|