怎么把获取的屏幕宽度和高度赋值给一个图片上面
<a class="bg" href="wxdy.html"><img src="/skin/zt/wxdy/banner.gif" id="img"></a><script>
var my=document.getElementById("img");
var w=screen.width;
var h=screen.height;
document.write(w);
my.style.width="document.write(w)+'px'";
my.style.height="document.write(screen.height)";
//var w=document.write(screen.width);
//var h=document.write(screen.height);
</script>
怎么值传递不对width和height那里,改怎么写。