【发布时间】:2015-12-17 11:09:12
【问题描述】:
我正在尝试使用 Google Closure 禁用 input 字段。谁能告诉我使用 Google Closure 执行该操作的语法是什么?
【问题讨论】:
标签: google-closure google-closure-library
我正在尝试使用 Google Closure 禁用 input 字段。谁能告诉我使用 Google Closure 执行该操作的语法是什么?
【问题讨论】:
标签: google-closure google-closure-library
可以使用 setAttribute() 函数禁用 google 闭包上的任何元素。
/**
* @type {Element}
* @private
*/
this.$title_ = null; // call getElementByClass('','') here;
this.$title_.setAttribute('disabled', 'disabled');
这里 this.$title 是一个输入元素。
【讨论】: