Accessing dom element outside VueJS Component – querySelector or Jquery

  

Outside component: 
  <input id="mytest" type="text" value="test"  >


In the Vuejs component querySelector or Jquery 
console.log("mytest: "+ document.querySelector("#mytest").value);
console.log("mytest 2: "+ $("#mytest").val());


  

querySelector Browser compatibility
https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector

VueJs getting started , starters

Getting Started with Vue – An Overview and Walkthrough Tutorial https://www.taniarascia.com/getting-started-with-vue/

Introduction https://vuejs.org/v2/guide/

VueJS for Dummies — From Vanilla JS to ES6 https://medium.com/1950labs/vuejs-for-dummies-99f57250452b

Vue Axios Post Request Example https://www.itsolutionstuff.com/post/vue-axios-post-request-exampleexample.html

Using Axios to Consume APIs https://vuejs.org/v2/cookbook/using-axios-to-consume-apis.html

Cracking Vue.js, using Axios inline html code https://joshua1988.github.io/vue-camp/vue/axios.html#%EC%95%A1%EC%8B%9C%EC%98%A4%EC%8A%A4-%EC%84%A4%EC%B9%98

How to create tabs in Vue.js https://renatello.com/vue-js-tabs/

Vuejs and Axios injecting in the html site

You know the better way using CLI and Component…

  


  <script src="https://cdn.jsdelivr.net/npm/vue"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>




<div id="app">
  {{ info }}
</div>





<script>
   
new Vue({

  el: '#app',
  data () {
    return {
      info: null
    }
  },
  mounted () {
    axios
      .get('https://api.coindesk.com/v1/bpi/currentprice.json')
      .then(response => (this.info = response))
  }
})
 </script>