<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>价格显示</title><script src="scripts/jquery-1.7.1.min.js"></script></head><body><script type="text/javascript"> $(function(){// 价格显示 ???$(".index_price").each(function(){ ???????$(this).html(‘<span class="big_price">‘ + $(this).html().split(‘.‘).join(‘.</span><span class="small_price">‘) ?+ ‘</span>‘); ???});})</script> <span>¥</span><span class="index_price">987.88</span><style>.big_price {font-size:20px;}.small_price {font-size:14px;}</style></body></html>
jQuery ?价格显示 ?前面位数与后面两位显示不同样式(一大一小)
原文地址:http://www.cnblogs.com/arealy/p/7765642.html