大佬教程收集整理的这篇文章主要介绍了jQuery .replaceWith()替代,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
小提琴在这里:http://jsfiddle.net/8CEwf/1/
我知道,似乎jQuery没有附加到它,但是如果你看一下HTML,jQuery就在那里,因为jsfiddle没有提供1.4.2版本
HTML:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <img src="/v/vspfiles/templates/cyberfront/images/buttons/btn_addtocart_small.gif"> <input type="image" src="/v/vspfiles/templates/cyberfront/images/buttons/btn_go_gray.gif"> <img src="/v/vspfiles/templates/cyberfront/images/Bullet_MoreInfo.gif">
脚本:
$(document).ready(function(){ $('img[src="/v/vspfiles/templates/cyberfront/images/buttons/btn_addtocart_small.gif"]').replaceWith('<br /><span id="blackbutton" class="mediumbutton" style="display:block;">Add to Cart</span>'); $('input[src="/v/vspfiles/templates/cyberfront/images/buttons/btn_go_gray.gif"]').replaceWith('<input type="submit" class="graybutton smallbutton" name="Go" alt="Go" value="Go" title="Go">'); $('img[src="/v/vspfiles/templates/cyberfront/images/Bullet_MoreInfo.gif"]').replaceWith('<span class="learnmore">Learn More</span>'); });
以上是大佬教程为你收集整理的jQuery .replaceWith()替代全部内容,希望文章能够帮你解决jQuery .replaceWith()替代所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。