天天看点

js中onclick事件传递多个参数方法

js中onclick事件传递多个参数方法

1.多个字符串拼接中onclick事件 传递参数写法

οnclick="messageHandle(\'' + hotelid + '\',\'' + reply + '\',\'' + star + '\',\'' + account + '\')"
           

2.vue中@click 传递多个参数方法

@click="messageHandle(info.hotelName,info.hotelId,info.id,info.infohotelId)"