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

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

為什么這樣寫沒(méi)有效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

? ? <head>

? ? ? ? <title>使用serialize()方法序列化表單元素值</title>

? ? ? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>

? ? ? ? <link href="style.css" rel="stylesheet" type="text/css" />

? ? </head>

? ??

? ? <body>

? ? ? ? <div id="divtest">

? ? ? ? ? ? <div class="title">

? ? ? ? ? ? ? ? <span class="fl">我的個(gè)人資料</span>?

? ? ? ? ? ? ? ? <span class="fr">

? ? ? ? ? ? ? ? ? ? <input id="btnAction" type="button" value="序列化" />

? ? ? ? ? ? ? ? </span>

? ? ? ? ? ? </div>

? ? ? ? ? ? <form action="">

? ? ? ? ? ? <ul>

? ? ? ? ? ? ? ? <li>姓名:<input name="Text1" type="text" size="12" /></li>

? ? ? ? ? ? ? ? <li>

? ? ? ? ? ? ? ? ? ? <select name="Select1">

? ? ? ? ? ? ? ? ? ? ? ? <option value="0">男</option>

? ? ? ? ? ? ? ? ? ? ? ? <option value="1">女</option>

? ? ? ? ? ? ? ? ? ? </select>

? ? ? ? ? ? ? ? </li>

? ? ? ? ? ? ? ? <li><input name="Checkbox1" type="checkbox" />資料是否可見(jiàn) </li>

? ? ? ? ? ? ? ? <li id="litest"></li>

? ? ? ? ? ? </ul>

? ? ? ? ? ? </form>

? ? ? ? </div>

? ? ? ??

? ? ? ? <script type="text/javascript">

? ? ? ? ? ? $(function () {

? ? ? ? ? ? ? ? $("#btnAction").bind("click", function () {var node=document.createElement("li");

? ? ? ? ? ? ? ? node.innerHTML=$("form").serialize();

? ? ? ? ? ? ? ? ? ? $("ul").appendChild(node);

? ? ? ? ? ? ? ? })

? ? ? ? ? ? })

? ? ? ? </script>

? ? </body>

</html>


正在回答

1 回答

$("ul").appendChild(node);同一個(gè)語(yǔ)句里jQuery與JavaScript語(yǔ)句混搭。

改為:$("ul").append(node);或:document.getElementsByTagName("ul")[0].appendChild(node);

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

慕粉3135539 提問(wèn)者

非常感謝
2016-04-12 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
jQuery基礎(chǔ)課程
  • 參與學(xué)習(xí)       154724    人
  • 解答問(wèn)題       7289    個(gè)

加入課程學(xué)習(xí),有效提高前端開(kāi)發(fā)速度

進(jìn)入課程

為什么這樣寫沒(méi)有效果

我要回答 關(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)