---
# System prepended metadata

title: ref 練習

---

### ==1.ref用法==
```javascript=
<template>
    <div>
    <button type="button" ref="input" @click="display">顯示ref</button>
  </div>
</template>
<script>
    function display() { console.log('2', input.value) }     
</script>