第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

最后兩個(gè)按鈕的功能沒(méi)法實(shí)現(xiàn),求大神幫我看看!

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>unwrap刪除包裹器</title>

<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>

<style>

.parent{

width: 1300px;

height: 300px;

border: 1px solid red;

margin: 50px auto 0;

text-align: center;

display: flex;

justify-content: space-around;

align-items: center;

}

.parent div{

border:1px solid red;

color: green;

}

.right-Txt{

border:1px solid red;

color: white;

background-color: black;

}

.btn{

width: 500px;

height: 80px;

margin: 50px auto 0;

display: flex;

justify-content: space-between;

align-items: center;

}

</style>

</head>

<body>

<div>

<p id="Txt1">hello,world!</p>

<p id="Txt2">hello,kitty!</p>

</div>

<div>

<input type="button" value="用方法1包裹" id="btn1">

<input type="button" value="用方法2包裹" id="btn2">

<input type="button" value="用方法1刪除包裹" id="btn3">

<input type="button" value="用方法2刪除包裹" id="btn4">

</div>

<script>

$('#btn1').on('click',function () {

/* body... */

$('#Txt1').wrap('<div></div>');?

?

})

</script>

<script>

$('#btn2').on('click',function () {

/* body... */?

$('#Txt2').wrap(function () {

/* body... */

return '<div></div>' ;

})

})

</script>

<script>

$('#btn3').on('click',function () {

/* body... */

$('#Txt1').unwrap('<div></div>');?

?

})


</script>

<script>

$('#btn4').on('click',function () {

/* body... */?

$('#Txt2').unwrap(function () {

/* body... */

return '<'<div></div>'>' ;

})

})

</script>

</body>

</html>



正在回答

1 回答

最后兩個(gè)<script></script>塊,修改成下面的就可以用了

<script>

? ? $('#btn3').on('click',function () {

? ? ? ? /* body... */

? ? ? ? $('#Txt1').unwrap();

? ? })

</script>

<script>

? ? $('#btn4').on('click',function () {

? ? ? ? ? ? /* body... */?

? ? ? ? ? ? $('#Txt2').unwrap(function () {

? ? ? ? ? ? /* body... */

? ? ? ? ? ? return '<div></div>';

? ? ? ? })

? ? })

</script>


2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉1467543007

或者這個(gè)<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>修改為用3.0版本以下的也可以。
2016-09-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

最后兩個(gè)按鈕的功能沒(méi)法實(shí)現(xiàn),求大神幫我看看!

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)