我正在寻找一个解决方案,其中div内容随页面加载而变化。非常像页面加载时的JavaScript图像。我在下面的代码中做了进一步的说明。在页面加载时更改div内容
我可以在页面加载时使用JavaScript随机化图像内容,但这里是divs,我不确定如何更改内容。
<div class="row BSlots">
<div class="Grid_4 fl">
/* This would be the code which would change */
/* For example once it would be <div class="hello"><p>Hi</p></div> and the other <iframe="Link"/> */
</div>
<div class="Grid_4 fr">
<script>Widget2(); /* Don't mind this, loading an actual JS image randomizer here */</script>
</div>
</div>
这可以不使用JS?如果没有,我会欣赏一个基本的例子,我可以拨弄:)
没有脚本,无论是客户端还是服务器端,没有办法,我想。 – gongzhitaao 2013-05-04 19:46:48
你不能这样做没有JavaScript。您拥有的唯一选项是服务器端,但每次加载页面后都保持静态。 – Daniel 2013-05-04 19:47:50
@Daniel我认为没有JavaScript也是可以的。 – 2013-05-04 19:50:49