onclick事件触发时报参数is not defined

 

onclick事件触发时报参数is not defined_第1张图片

 

 

 

----------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

----------------------------------------------------------------------------------------------------------------------------------------------------------

 

onclick事件触发时报参数is not defined_第2张图片

----------------------------------------------------------------------------------------------------------------------------------------------------------

 

解决: onclick括号里的参数加单引号即可,如 οnclick="addFriends('${ u.name }')"

 

你可能感兴趣的:(前端,js,onclick,not,defined)