您好我想更改输入文字属性。像这样的代码
<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>
我想将禁用更改为启用。但我必须在数据网格视图上选择多选。
here示例
答案 0 :(得分: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>