-2
var myhtml= '<td class="dataCell"><table border="0" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" width="100%"><tbody><tr bgcolor="#FFFFFF"><td><div align="right">1.</div></td><td>Kabul Edildi - İZMİR(ÇAMDİBİ/ÇAMDİBİ)</td><td><div>04/02/2013 16:06:16</div></td></tr><tr><td><div align="right">2.</div></td><td>Torbaya Eklendi - İZMİR(ÇAMDİBİ/ÇAMDİBİ)</td><td><div>04/02/2013 16:09:33</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">3.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - İZMİR(İZMİR K.İ.M/MERKEZ)</td><td><div>04/02/2013 18:01:35</div></td></tr><tr><td><div align="right">4.</div></td><td>Torbaya Eklendi - İZMİR(İZMİR K.İ.M/MERKEZ)</td><td><div>04/02/2013 18:52:15</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">5.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - AYDIN(AYDIN POS.DAG.VE TOP/AYDIN POS.DAG.VE TOP)</td><td><div>05/02/2013 02:22:20</div></td></tr><tr><td><div align="right">6.</div></td><td>Torbaya Eklendi - AYDIN(AYDIN POS.DAG.VE TOP/AYDIN POS.DAG.VE TOP)</td><td><div>05/02/2013 02:35:34</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">7.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - AYDIN(SÖKE/SÖKE)</td><td><div>05/02/2013 09:27:41</div></td></tr></tbody></table></td>';
$('#siptakip_1360003997').html($('.dataCell', myhtml)); // ->not work....
$('#siptakip_1360003997').html(jQuery(myhtml).find('.dataCell').html()); // ->not work....

Jqueryコードが機能しないのはなぜですか?どうすれば修正できますか?

4

1 に答える 1

0

あなたは何をしようとしているのですか??

これは役立つかもしれません...

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery.js"></script>
<script>
    $(function(){
        var myhtml= '<td class="dataCell"><table border="0" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" width="100%"><tbody><tr bgcolor="#FFFFFF"><td><div align="right">1.</div></td><td>Kabul Edildi - İZMİR(ÇAMDİBİ/ÇAMDİBİ)</td><td><div>04/02/2013 16:06:16</div></td></tr><tr><td><div align="right">2.</div></td><td>Torbaya Eklendi - İZMİR(ÇAMDİBİ/ÇAMDİBİ)</td><td><div>04/02/2013 16:09:33</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">3.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - İZMİR(İZMİR K.İ.M/MERKEZ)</td><td><div>04/02/2013 18:01:35</div></td></tr><tr><td><div align="right">4.</div></td><td>Torbaya Eklendi - İZMİR(İZMİR K.İ.M/MERKEZ)</td><td><div>04/02/2013 18:52:15</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">5.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - AYDIN(AYDIN POS.DAG.VE TOP/AYDIN POS.DAG.VE TOP)</td><td><div>05/02/2013 02:22:20</div></td></tr><tr><td><div align="right">6.</div></td><td>Torbaya Eklendi - AYDIN(AYDIN POS.DAG.VE TOP/AYDIN POS.DAG.VE TOP)</td><td><div>05/02/2013 02:35:34</div></td></tr><tr bgcolor="#FFFFFF"><td><div align="right">7.</div></td><td>Gönderinin Geliş Kaydı Yapıldı - AYDIN(SÖKE/SÖKE)</td><td><div>05/02/2013 09:27:41</div></td></tr></tbody></table></td>';
        $('#siptakip_1360003997').html(myhtml);
    });
</script>
<title>Untitled Document</title>
</head>

<body>

<table>
    <tr id="siptakip_1360003997"></tr>
</table>

</body>
</html>
于 2013-02-05T12:38:06.233 に答える