body onresize vs window.onresize
- From: "Tony" <tony23@xxxxxxxxxxxxxx>
- Date: 29 Nov 2005 10:14:24 -0800
If I want to call a function (call it doResize) when the browser window
is resized, is it better to put that in the body tag:
<body onresize="doResize()">
Or is it better to put the call in a script tag in the <head>:
<script type="text/javascript">
window.onresize = doResize;
</script>
Or, is there no practical difference between the two?
.
- Follow-Ups:
- Re: body onresize vs window.onresize
- From: Thomas 'PointedEars' Lahn
- Re: body onresize vs window.onresize
- Prev by Date: Re: Seeking a JavaScript expert (job opportunity, Boston, MA, USA)
- Next by Date: Re: how to escape function call parameter
- Previous by thread: Disabling the close button
- Next by thread: Re: body onresize vs window.onresize
- Index(es):