开发者

Javascript missing argument

开发者 https://www.devze.com 2023-02-19 04:24 出处:网络
create_anchor.setAttribute(\"onclick\", \"getModelData(\"+model.model_id.toString()+\", \"+model.model_name.toString +\")\");
create_anchor.setAttribute("onclick",
   "getModelData("+model.model_id.toString()+",
   "+model.model_name.toString +")"); 

it showing error while i'm passing another parameter to that function,the error is "missing ) after argument list"

[Break on this error] the ouput is like this getModelDa开发者_StackOverflowta(7,xxxx - xxxx series(H))


create_anchor.setAttribute("onclick","getModelData("+model.model_id.toString()+",'"+model.model_name.toString +"')");

Your mode.model_name.toString should be enclosed in quotes

0

精彩评论

暂无评论...
验证码 换一张
取 消