wrap

英[r?p]? ?美[r?p]??

vt.包;纏繞;用…包裹(或包紮、覆蓋等);掩護(hù)

n.膝毯,披肩,圍巾,圍脖,頭巾,罩衫,外套,大衣;包裝紙;〈俚〉機(jī)密

vi.纏繞,盤繞(通常與over, around 等連用) ;包上,裹上;穿上(衣服等)

inner

#英[??n?(r)]? ?美[??n?]??

#adj

adj .內(nèi)部的,內(nèi)心的;精神的;秘密的

###n.內(nèi)部,裡面;射中接近靶心部分的一發(fā)###

jquery的wrapInner()方法 語法

作用:wrapInner() 方法使用指定的 HTML 內(nèi)容或元素,來包覆每個(gè)被選元素中的所有內(nèi)容 (inner HTML)。

語法:$(selector).wrapInner(wrapper)

#參數(shù):

參數(shù)說明
wrapper? ??##。規(guī)定包圍在被選元素的內(nèi)容周圍的內(nèi)容??赡艿闹?HTML 程式碼- 例如("<div></div>")新的DOM 元素- 例如(document.createElement("div"))已存在的元素- 例如($(".div1" ))已存在的元素不會被移動,只會被複製,並包裹被選元素。

使用函數(shù)包裹內(nèi)容:使用函數(shù)來規(guī)定包圍在每個(gè)被選元素周圍的內(nèi)容

##語法:$(selector).wrapInner(function())

#參數(shù):

##參數(shù)function()

jquery的wrapInner()方法 範(fàn)例

<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $(".btn1").click(function(){
    $("p").wrapInner("<b></b>");
  });
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button class="btn1">加粗段落中的文本</button>
</body>
</html>
執(zhí)行實(shí)例 ?

#點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例

#

    描述
    必要。規(guī)定傳回包圍元素的函數(shù)。
    <thead id="pxxln"></thead>
    <style id="pxxln"><delect id="pxxln"><style id="pxxln"></style></delect></style>

      <span id="pxxln"><small id="pxxln"></small></span>

      <rt id="pxxln"><small id="pxxln"></small></rt>
      <span id="pxxln"><optgroup id="pxxln"></optgroup></span>
    1. <li id="pxxln"><meter id="pxxln"></meter></li>