I've got a Vue file and I would like to set an 'action' attribute of my form.
<template>
<div>
<form>
</form>
</div>
</template>
export default {
created() {
var test = document.getElementById("form");
test.setAttribute('action', 'file.php');
}
But setting it in a lifecycle hook doesn't work. What should I do?