0

您好我想更改输入文本属性。像这样的代码

<div class="bungkus">
<div class="judul1"><input type="text" disabled value="data1" class="classb"/></div>
<div class="judul1"><input type="text" disabled value="data2" class="classb"/></div>
<div class="judul1"><input type="text" disabled value="data3" class="classb"/></div>

  <div class='edit'><input type="image" src="http://i1172.photobucket.com/albums/r568/novikoraharja/TextEdit.png" onclick="edit()" id="edit" ></div>

  <div class='cancel'><input type="image" src="http://i1172.photobucket.com/albums/r568/novikoraharja/Buttoncancel.png"  onclick="deletes(<?php echo $row['ID'];?>)"> </div>

<div class="judul1"><input type="text" disabled value="data4" class="classb"/></div>
<div class="judul1"><input type="text" disabled value="data5" class="classb"/></div>
<div class="judul1"><input type="text" disabled value="data6" class="classb"/></div>

  <div class='edit'><input type="image" src="http://i1172.photobucket.com/albums/r568/novikoraharja/TextEdit.png" onclick="edit()" id="edit" ></div>

  <div class='cancel'><input type="image" src="http://i1172.photobucket.com/albums/r568/novikoraharja/Buttoncancel.png"  onclick="deletes(<?php echo $row['ID'];?>)"> </div>
</div>

我想将禁用更改为启用。但我必须在数据网格视图上选择多选。

这里的例子

4

1 回答 1

2

使用 jQuery 的示例:

<script type="text/javascript" src="link/to/your/jquery.min.js"></script>

 <script type="text/javascript">
 $(document).ready(function(){

 $("#your_trigger_id").click(function(){

 $("#your_input_id").attr("disabled",true);

 });


//remove disabled again
 $("#your_trigger_id").click(function(){

 $("#your_input_id").removeAttr("disabled");

 });

 });
 </script>
于 2012-04-18T09:11:50.357 回答