Yes, you can get the value of an input form by its name attribute in Vue.js without data binding. You can use the ref attribute to reference the input element and then access its value using the $refs property.
Here's an example:
<template>
<div>
<input type="text" name="myInput" ref="myInput">
<button @click="getValue">Get Value</button>
</div>
</template>
<script>
export default {
methods: {
getValue() {
const value = this.$refs.myInput.value;
console.log(value);
}
}
}
</script>
In this example, we have an input element with the name "myInput" and a button that triggers the getValue method. Inside the getValue method, we access the input element using this.$refs.myInput and then get its value using the value property. Finally, we log the value to the console.
Note that using ref is not recommended in most cases, as it goes against the reactive nature of Vue.js. It's usually better to use data binding to keep your component state in sync with the input values.