开发者

cant jquery.last() not Supported by ie

开发者 https://www.devze.com 2023-02-10 19:29 出处:网络
this is my code : $(\'script\').last().parent().html(\'kkkk\') but it show error in ie ,开发者_Python百科

this is my code :

$('script').last().parent().html('kkkk')

but it show error in ie ,

开发者_Python百科

so what can i do ,

thanks


Try $('script:last').last().parent().html('kkkk')

That seams to work.


Not sure what is your script's parent... but this works

http://jsfiddle.net/hkrAx/

Assumming you are targeting the wrapper of a <script /> tag.

0

精彩评论

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