我在page.php上有代码
<script type="text/javascript">
$(document).ready(function() {
var timeline_data = [{
content:' <div class="classdiv"> <div id="proID" >$rows[$id]</div> </div> '; ?>,
}];
$().product('.classdiv');
});
</script>
当时间轴加载div时,
div <div class="classdiv"> <div id="proID" >$rows[$id]</div> </div>
具有正确的ID。
HTML正确生成
<div class = "classdiv"> <div id = "proID"> 123 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 243 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 423 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 743 </ div> </ div>,
但是page.php只显示所有div内容中的单个ID
<div class = "classdiv"> <div id = "proID"> 123 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 123 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 123 </ div> </ div>,
<div class = "classdiv"> <div id = "proID"> 123 </ div> </ div>,
请告诉我解决方案是什么?