Jquery replace 字符替換實現(xiàn)代碼
更新時間:2010年12月02日 12:48:07 作者:
Jquery replace 字符替換實現(xiàn)代碼,需要的朋友可以參考下。
示例:要修改圖片的大?。?
<img id="rptComment_ctl01_Gravatar1" width="60" height="60" src="http://www.dhdzp.com/avatar.php?gravatar_id=f847fb8954f1750719d3feef3b033718&rating=G&size=60" />
使用如下語句,將圖片屬性中的size替換。
$("image").attr("src").replace("size=60", "size=200");
replace(要替換的目標,替換后新值)
<img id="rptComment_ctl01_Gravatar1" width="60" height="60" src="http://www.dhdzp.com/avatar.php?gravatar_id=f847fb8954f1750719d3feef3b033718&rating=G&size=60" />
使用如下語句,將圖片屬性中的size替換。
$("image").attr("src").replace("size=60", "size=200");
replace(要替換的目標,替換后新值)
相關文章
jQuery+css3實現(xiàn)文字跟隨鼠標的上下抖動
這篇文章主要介紹了jQuery+css3實現(xiàn)文字跟隨鼠標的上下抖動的相關資料,需要的朋友可以參考下2015-07-07
seajs加載jquery時提示$ is not a function該怎么解決
這篇文章主要介紹了seajs加載jquery時提示$ is not a function該怎么解決的相關資料,需要的朋友可以參考下2015-10-10

