Onload check a checkbox

Would like to put an onload to check this checkbox and activate the onclick function without putting an onload in the <body tag>. Any ideas?

<input type=‘checkbox’ name=‘shipToBillAddr’ value=‘true’ onClick=‘copyBilling();’>

Try this.

<script type="text/javascript">
window.onload = function() {
  if(document.forms[0] && document.forms[0].shipToBillAddr) {
    document.forms[0].shipToBillAddr.checked = true;
    document.forms[0].shipToBillAddr.onclick();
  }
}
</script>