ChingFeng
Sep 9, 2018 · 2 min read

VueJs Ajax篇-Axios(二)

表單驗證

使用Html 5表單驗證

◉應用

=【Html】=
— — — — — — — — — — — —
<div id="app">
<form @submit.prevent="vueSubmit">
<div>
<label>Name</label>
<input type="text" required>
</div>
<div>
<label>Email</label>
<input type="email" required>
</div>
<div>
<label>Submit</label>
<button type="submit">Submit</button>
</div>
</form>
</div>
— — — — — — — — — — — —
=【VueJs】=
— — — — — — — — — — — —
new Vue({
el: '#app',
methods:{
vueSubmit(){
console.info('fake AJAX request')
}
}
});

Object實戰

學習歷程紀錄

ChingFeng

Written by

叢林般的世界,一步步邁向未知的未來,迴盪迷途的工程師…

Object實戰

學習歷程紀錄

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade