Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

vue js focus ref

<input type="text" ref="searchbar">

<script>
export default {
  mounted() {
    this.$refs.searchbar.$el.focus();
  }
};
</script>
 
PREVIOUS NEXT
Tagged: #vue #js #focus #ref
ADD COMMENT
Topic
Name
1+9 =