グレーを選択

2083 ワード


<td class="td">
    <input type="checkbox" name="target"  id="path" value="checkbox"  onclick="ischecked()" />
                ID
            </td>
            <td class="td">
                <input type="text" class="text" size="23" disabled="disabled" style="background:#CCCCCC" name="vmTemplatePath" id="vmTemplatePath" />
                &nbsp;
            </td>
            <td class="td">
                <input type="checkbox" name="target"  value="checkbox" id="desc"  onClick="ischecked()" />
                Name
            </td>
           
           <td  class="td">
            <input type="text" class="text" size="23" disabled="disabled" style="background:#CCCCCC" name="description" id="description" />
                &nbsp;
           </td>
<script type="text/javascript">
   var vmTemplatePath =document.getElementById("ID");
   var description =document.getElementById("Name");
function ischecked()
{
   var path = document.getElementById("path");
   var desp = document.getElementById("desc");

if(path.checked)
{

 vmTemplatePath.disabled=false;
 vmTemplatePath.style.background='white';

}
else 
{
  vmTemplatePath.disabled=true;
  vmTemplatePath.style.background='#CCCCCC';
  
}

if(desp.checked)
{
   description.disabled=false;
   description.style.background='white';
}
else 
{
  description.disabled=true;
  description.style.background='#CCCCCC';

}
}
</script>