<span>
<script type="text/javascript">
document.write('<iframe src="http://example.com/index.php?m=member&c=index&a=mini&forward=' + encodeURIComponent(location.href) + '&siteid=1" allowTransparency="true" width="500" height="24" frameborder="0" scrolling="no"></iframe>')
</script>
</span>
phpcms开源系统中有这样的一行代码。其实就是输出一个iframe框架,使用document.write来写和直接写一个iframe不是一样的吗,或者说这样做可以延迟加载,或者有其他的什么原因呢?
是因为他的变量在js里,所以用的js渲染的