解决方案 »

  1.   

    var tcshe=new TanCshe(200,200,tcs);//这个怎么没问题啦?你的tcs在哪?
    var tcshe=new TanCshe(200,200,create('ids'));//这个确有问题
      

  2.   

    <body onkeydown="tcshe.move(event)">
        <div id='area' style='width:500px;height: 300px;border: 1px solid black;'>
        <div id='tcs' style='width:10px;height: 10px;background-color: blue;position: absolute;'onclick="create('ids')"></div>
        </div>
        <script type="text/javascript" language="javascript">
    var speed=1;这是 html部分
      

  3.   

    其中的onclick="create('ids')"一开始没有,我想让其自己添加,可是不行,加了这个函数后,就没问题了