object-test.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>HTML5 Shiv</title>
  6. <link rel="stylesheet" href="style.css">
  7. <style>
  8. .box {
  9. position: relative;
  10. zoom: 1;
  11. }
  12. .swf-overlay {
  13. position: absolute;
  14. top: 0;
  15. left: 0;
  16. width: 200px;
  17. height: 100px;
  18. border: 1px solid #000;
  19. }
  20. </style>
  21. <script src="../src/html5shiv.js"></script>
  22. <script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
  23. <script>
  24. swfobject.registerObject('static-id', '6.0.0');
  25. swfobject.embedSWF('data/paramtracer.swf', 'dynamic-id', '480', '420', '6.0.0', null, { 'aFlashVar': 'aFlashVarValue' }, { 'wmode': 'transparent' });
  26. </script>
  27. </head>
  28. <body>
  29. <section>This sentence has 3px solid border <mark>with these words highlighted</mark>.</section>
  30. <h1>static swfobject</h1>
  31. <div class="box">
  32. <object id="static-id" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="420">
  33. <param name="movie" value="data/paramtracer.swf">
  34. <!--[if !IE]>-->
  35. <object type="application/x-shockwave-flash" data="data/paramtracer.swf" width="480" height="420">
  36. <!--<![endif]-->
  37. <param name="flashvars" value="aFlashVar=aFlashVarValue">
  38. <param name="wmode" value="transparent">
  39. <!--[if !IE]>-->
  40. </object>
  41. <!--<![endif]-->
  42. </object>
  43. <div class="swf-overlay"></div>
  44. </div>
  45. <h1>dynamic swfobject</h1>
  46. <div class="box">
  47. <div id="dynamic-id">
  48. </div>
  49. <div class="swf-overlay"></div>
  50. </div>
  51. <h1>innerHTML object</h1>
  52. <div class="box" id="checkinner">
  53. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="420">
  54. <param name="movie" value="data/paramtracer.swf">
  55. <!--[if !IE]>-->
  56. <object type="application/x-shockwave-flash" data="data/paramtracer.swf" width="480" height="420">
  57. <!--<![endif]-->
  58. <param name="flashvars" value="aFlashVar=aFlashVarValue">
  59. <param name="wmode" value="transparent">
  60. <!--[if !IE]>-->
  61. </object>
  62. <!--<![endif]-->
  63. </object>
  64. <div class="swf-overlay"></div>
  65. </div>
  66. <script>
  67. (function(){
  68. var box = document.getElementById('checkinner');
  69. var box2 = document.createElement('div');
  70. box2.innerHTML = box.innerHTML;
  71. box.innerHTML = '';
  72. box.appendChild(box2);
  73. })();
  74. </script>
  75. <body>
  76. </html>