feat(benchpress): add getStringParameter method to support text and radio inputs
This commit is contained in:
@ -7,8 +7,14 @@
|
||||
var name = match[1];
|
||||
var value = match[2];
|
||||
var els = document.querySelectorAll('input[name="'+name+'"]');
|
||||
var el;
|
||||
for (var i=0; i<els.length; i++) {
|
||||
els[i].value = value;
|
||||
el = els[i];
|
||||
if (el.type === 'radio' || el.type === 'checkbox') {
|
||||
el.checked = el.value === value;
|
||||
} else {
|
||||
el.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
Reference in New Issue
Block a user