我在asp.net mvc视图中有以下脚本: -
function disableform(id) {
$('#' + id).prop("disabled", true);
}
Run Code Online (Sandbox Code Playgroud)
但上面的功能只会禁用使用Internet Explorer的元素,但是无法在chrome或firefox上工作,我也试着写attr('disabled', 'disabled')而不是.prop("disabled", true);,但它没有解决问题.
我的Jquery版本是1.7.1
那可能是什么问题呢?
BR
ily*_*oli 10
禁用表单是错误的!IE只是搞乱了!你应该禁用字段.
function disableform(id) {
$('#' + id+' :input').prop("disabled",true);
}?
Run Code Online (Sandbox Code Playgroud)