[開始] ボタンと [リセット] ボタンは、入力フィールドのテキストの変更をトリガーします。
jquery.mobile-1.3.0.min.js をインポートすると
、イベントへのボタンが再トリガーされるようにページをリロードする必要があります。
Jquery-1.8.2 を使用するだけで完全に機能します。
Jquery モバイル UI で必要なリロードを停止するにはどうすればよいですか?
Firefox 19.02 を使用しています。
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
</head>
<body>
<form id='testform' action="#">
<fieldset>
<label for="timer">
<span>Event triggered</span>
<input type='text' name='triggered'>
</label>
</fieldset>
<fieldset>
<input value="Start" type="submit">
<input value="Reset" type="reset">
</fieldset>
</form>
<script type="text/javascript">
//bind a submit handler to the sample form
document.getElementById('testform').onsubmit = function()
{
$("input[name='triggered']").val("Start button clicked.");
// cancel the normal submit
return false;
};
document.getElementById('testform').onreset = function()
{
$("input[name='triggered']").val("Reset clicked.");
//cancel the normal rest
return false;
};
</script>
</body>
</html>