Skip to content

Commit 3fad8ec

Browse files
committed
Fix index.js
1 parent 9897832 commit 3fad8ec

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • WKJavaScriptController-Demo/WKJavaScriptController-Demo

WKJavaScriptController-Demo/WKJavaScriptController-Demo/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ function submit() {
22
var values = {};
33
Array.prototype.slice.call(document.getElementsByTagName('input')).forEach(function(el) {
44
if (el.type !== 'button' && el.type !== 'radio') {
5-
values[el.id] = el.value;
5+
if (el.id === 'zip_code') {
6+
values[el.id] = parseInt(el.value);
7+
} else {
8+
values[el.id] = el.value;
9+
}
610
}
711
});
812
if (isChecked('input_json')) {

0 commit comments

Comments
 (0)