开发者

Execute dynamic code

i have following in a string.

javascript: __doPostBack('GridWidget', 'Edit$0')

how can i dynamically exec开发者_运维问答ute this?


Remove the "javascript:" from the front, and call eval() on the string.


var js = "javascript: __doPostBack('GridWidget', 'Edit$0')".replace("javascript:","");
eval(js)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜