0
<div id='imgCaption' style='background-color:grey;padding:5px 20px;color:white;'>
</div>
<script language="javascript>
// lots of codes
$('#imgCaption').html(imgCaption + \"<div style='width:87px; float:right; text-align:right;'>\" + nextImgNum + ' of ' + totalNo + \"</div>\");
</script>
结果并不稳定。Html文本控制(DIV不能识别另一个创建的动态??)
第一结果
Some caption text 1 of 11
第二结果
Some caption text continuing.....................................................
.. 1 of 11
第三结果
Some caption text continuing ...............................................
1 of 11
第一和2 nd第二个结果是好的,因为标题文本和索引文本在同一行中。
第三个结果不正确,因为它们在不同的行上。并且标题div的背景颜色不包含索引div。
其结果,该索引不能被周围看到的所述第三结果..
任何工作?
TKZ ..