添加
function aa()
{
var ttt=GetCookie("user","user_id"); 
getList(ttt);
}
其余的改成
<body topmargin="3"  onload="aa()"> 

解决方案 »

  1.   


    <script>
    window.onload=function aa(){
    var ttt=GetCookie("user","user_id"); 
    getList(ttt); 
    }
    </script>
    <body topmargin="3"  onload="aa()">
      

  2.   

    1、问题是页面载入的时候要传一个参数给getList函数
    2、传给getList的参数从哪得到,你这个html页面是后台程序动态生成的吗?如果是则直接传给该函数即可
    3、如果getList的参数是从其它页面传递过来的,这个页面中有frameset等。那么可以通过父窗口的document取到该值