问题标签 [mootools-more]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - Mootools iterate over form and grep values for xhr-request
Is it possible to get all values from a <form>
and parse it to mootools/json, so that I can use it in an XHR-request like:
At the moment I have only text-input fields. In the json I like to have the input-name or ID as the key for the value. e.g.:
//mootools script parsing above to this:
javascript - 如何使 Mootools get('html') 包括输入字段的值
当我有 HTML 输入字段并通过直接输入更改它们时,它们实际上应该更改值属性。但是当我尝试获取整个 HTML 记录时,它只会显示旧的值属性。不知何故,这对我来说很清楚,因为 HTML 没有被覆盖,但我需要包含更改的输入值的 HTML。我该如何接近它?
例子:
始终提醒:
但我需要得到的是: