วิธีใส่ iframe ให้สามารถ Validate กับ W3C ผ่านได้แบบสบายๆ

<script type="text/javascript">
$('#map').append('<iframe width="320" height="330" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?msa=0&amp;msid=211771423433858136502.0004a7b40e5cc6d2f0f96&amp;ie=UTF8&amp;ll=26.213359,127.680359&amp;spn=0.012706,0.013518&amp;z=15&amp;output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?msa=0&amp;msid=211771423433858136502.0004a7b40e5cc6d2f0f96&amp;ie=UTF8&amp;ll=26.213359,127.680359&amp;spn=0.012706,0.013518&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">โอกินาว่า</a> in a larger map</small>');</script>

trick นี้ใช้แทน

document.write();

ป้ายกำกับ: , ,