onclick="disable_chk(this)"function disable_chk(o)
var id = o.value;

解决方案 »

  1.   

    use id.
    id="house_name2"
    document.getElementById("house_name"+id).
      

  2.   

    function disable_chk(hoho)
    {
    var id=hoho.value;
    //alert(id);
    document.getElementByName("house_name"+id).disabled=true;
    return;
      }
    ....
    <body>
    <td width="5" height="13"><input type="checkbox" name="update" value=2 onclick="disable_chk(this)"></td>
      

  3.   

    在函数中,如果想使用this,下面这种情况可以String.prototype.test = function()
    {
       alert(this);
    }此时,this代表String对象
      

  4.   

    document.getElementByName("house_name"+id).disabled=true;the program segment is errorif you want to do that, you'd must replace it with the next:document.getElementByName(eval("house_name"+id)).disabled = true;you will be okay!!!!!!!!!!!!