Javascript 为mootools元素设置没有值的属性
我必须使用Mootools重新创建以下html元素Javascript 为mootools元素设置没有值的属性,javascript,html,mootools,Javascript,Html,Mootools,我必须使用Mootools重新创建以下html元素 <input type="file" name="file[]" id="file" multiple /> 检查一下 问题是我无法在元素中设置multiple属性。如何在mootools元素中设置一个没有值的属性(在本例中为multiple) multiple是一个布尔属性,因此您可以将true作为值传递: $('test').adopt(new Element('input', { 'type': 'file',
<input type="file" name="file[]" id="file" multiple />
检查一下
问题是我无法在元素中设置
multiple
属性。如何在mootools元素中设置一个没有值的属性(在本例中为multiple
) multiple
是一个布尔属性,因此您可以将true
作为值传递:
$('test').adopt(new Element('input', {
'type': 'file',
'id': 'file',
'name': 'file[]',
'multiple': true
}));
multiple
是一个布尔属性,因此您可以将true
作为值传递:
$('test').adopt(new Element('input', {
'type': 'file',
'id': 'file',
'name': 'file[]',
'multiple': true
}));