1
このMeteorクライアントの「簡易版」コードは、キーボード入力キーをタッチしたときにブラウザコンソールに「提出済み」を印刷する必要がありますが、何もしません。
なぜ、どのように修正するのですか? THX search
テンプレートであなたの入力部でMeteor enter key event
Template.body.events({
'submit #myForm': function(e) {
e.preventDefault();
console.log('submitted'); //<=========
}
});
<body>
<form id="myForm">
{{> index}}
</form>
</body>
<template name="index">
<div id="main">
{{> content}}
</div>
</template>
<template name="content">
{{> Template.dynamic template=whichOne}}
</template>
<template name="search">
<input class="half" type="text" id="food" autocomplete="off">
</template>