You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/input-no-initial-value/input.svelte

13 lines
244 B

<script>
let test = undefined;
function handleSubmit(event) {
event.preventDefault();
console.log('value', test);
}
</script>
<form on:submit={handleSubmit}>
<input bind:value={test} type=text required>
<button>Store</button>
</form>