开发者

Object in inline onclick event

Why is this not working ?

<img id="xx" src="/Content/components/imgs/add.gif" onclick='ShowLookup({"id": "22","name": "Robert Pitt"})' />
开发者_运维问答

or

<img id="xx" src="/Content/components/imgs/add.gif" onclick='ShowLookup("id": "22","name": "Robert Pitt")' />

When I click on the image I got an error: Invalid property id


Works like a charm for me :

http://jsfiddle.net/neebz/uwywG/1/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜