在jsp或者是html里面,添加点击事件的代码如下
οnclick="getDate()"
<button onclick="getDate()">搜索</button>
在vue项目中,添加点击事件的代码如下
@click="方法名()"
<el-button type="primary" icon="el-icon-search" @click="searchData()">搜索</el-button>
οnclick="getDate()"
<button onclick="getDate()">搜索</button>
@click="方法名()"
<el-button type="primary" icon="el-icon-search" @click="searchData()">搜索</el-button>