在js中拼接html标签传参时,如果方法参数是字符串需要加上引号,这里需要进行字符转义
<a href='javascript:addMenuUI("+"\""+item.id + "\""+")'>
Powered by: 博客园 Copyright © 2024 cherless2 Powered by .NET 9.0 on Kubernetes