Java スクリプト コード
$("#category select").change(function(){
var category = $('select option:selected').html();
$.ajax({
type:"Post",
url:"collectiepost.php",
data:"category="+category,
cache:"false",
success:function(html){
$("select").html($(html).find("option.category"));
$("#test").html($(html).find("#testdata"));
}
});
});
});
そのページのhtml出力collectiepost.php
<select id="ontwerper">
<option class="desinger">vikas</option>
</select>
<select id="category">
<option class="category">cloth1</option>
<option class="category">cloth2</option>
</select>
<div id="testdata">test data</div>
出力が必要
<select>
<option class="category">cloth1</option>
<option class="category">cloth2</option>
</select>
<div id="test">
<div id="testdata">test data</div>
</div>
問題
しかし、divタグなしでそれらの出力を取得しています
<select>
<option class="category">cloth1</option>
<option class="category">cloth2</option>
</select>