var f = `<a class="btn btn-success btn-sm" href="#" title="备用" mce_href="#" onclick="resetPwd('${encodeURIComponent(JSON.stringify(row.bw))}')">查看</a>`;
function resetPwd(data) {
let dataJson = decodeURIComponent(data).slice(1, -1).replace(/\\"/g, '"');
const row = JSON.parse(dataJson);
}
js方法传参数是json或者对象
![](https://img-home.csdnimg.cn/images/20240711042549.png)