javascript的禁用属性无法在js文件中使用 [英] disabled property of javascript not working in a js file
本文介绍了javascript的禁用属性无法在js文件中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在js文件中使用时,object.disabled属性不起作用.在开头部分内联使用语句时,相同的属性有效.
我不是在使用JQuery.
The object.disabled property is not working when used in a js file. the same property is working when the statement is used inline in head section.
Is it designed with that behavior?I am not using JQuery.
推荐答案
试试这个
document.getElementById( ''btnSubmit'' ).disabled=''true'';
这篇关于javascript的禁用属性无法在js文件中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文