5.4.23 The Form.Element.Serializers object

优质
小牛编辑
135浏览
2023-12-01

这个对象提供了内部使用的用来协助解析出表单元素的当前值的一些有用的方法。

MethodKindArgumentsDescription
inputSelector(element)instanceelement: object or id of a form element that has the checked property, like a radio button or checkbox.返回带有元素名称和值的Array , 如['elementName', 'elementValue']
textarea(element)instanceelement: object or id of a form element that has the value property, like a textbox, button or password field.返回带有元素名称和值的Array , 如['elementName', 'elementValue']
select(element)instanceelement: object of a <select> element返回带有元素名称和所有被选择的选项的值或文本的Array , 如['elementName', 'selOpt1 selOpt4 selOpt9']