JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://code.htmlhifive.com/h5.css">
<script src="https://code.htmlhifive.com/ejs-h5mod.js"></script>
<script src="https://hifive.github.io/hifive-res/fw/current/h5.dev.js"></script>
<script src="https://hifive.github.io/hifive-ui-library/hifive-ui-library/WebContent/components/appContainer/src/ApplicationController.js"></script>
<link rel="stylesheet" href="https://hifive.github.io/hifive-ui-library/hifive-ui-library/WebContent/components/appContainer/src/ApplicationController.css">
<form action="jsp/welcome-json.jsp" name="form1" target="form2">
<label>名前</label><input type="text" class="name" value="たろう" />
<p data-h5-bind="message">更新対象</p>
<input type="submit" />
</form>
<form action="jsp/welcome-json.jsp" name="form2" target="form1">
<label>名前</label><input type="text" class="name" value="じろう" />
<p data-h5-bind="message">更新対象</p>
<input type="submit" />
</form>
JavaScript
$(function() {
h5.core.controller('body', h5.ui.container.ApplicationController);
// ダミー実行
$.ajax = function(data) {
var deffered = h5.async.deferred();
var p = deffered.promise();
p.dataTypes = ["text", "json"];
setTimeout(function() {
deffered.resolve({
message: "更新されました"
});
}, 1000);
return p;
}
});