Ниже код который меня почти устроил, но есть значительный глюк после write() документ очищается. Как этого избежать?
| Код | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Безымянная страница</title> <script type="text/javascript"> var str=null, Wplay=null; function batton(str){ Wplay= '<object id=\"MediaPlayer\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" ' + 'codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6, 4, 5, 715\"' + 'width=\"490\" height=\"370\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\">' + ' <param name=\"FileName\" value=\"http://www.vesti.ru/video1.asx?vid=onair\">' + ' <param name="TransparentAtStart" value="true">' + '<param name="wmode" value="transparent">' + '<param name="AutoStart" value="true">' + '<param name="AnimationatStart" value="false">' + '<param name="ShowStatusBar" value="true">' + '<param value="false" name="enableContextMenu">' + '<param name="ShowControls" value="true">' + '<param name="autoSize" value="false">' + '<param name="displaySize" value="false">' + '<param name="ShowAudioControls" value="true">' + '<param name="ShowPositionControls" value="true">' + '<param name="windowlessVideo" value="false">' + '<embed type=\"application/x-mplayer2\"' + 'pluginspage=\"http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/\"' + str + 'name=\"MediaPlayer\" width=\"490\" height=\"370\"' + 'transparentatstart=\"1\" wmode=\"transparent\" autostart=\"1\" animationatstart=\"1\" showcontrols=\"1\" showaudiocontrols=\"1\" showpositioncontrols=\"1\" autosize=\"0\" showstatusbar=\"1\" displaysize=\"false\" windowlessVideo=\"true\">' + ' </embed>' + '</object>' + '</br>' + str; document.write(Wplay); } </script> <style type="text/css"> .style1 { width: 500px; height:400px; } .style2 { height: 30px; width: 227px; } .style3 { height: 30px; width: 151px; } </style> </head> <body> <table id="t100" border='1'> <tr > <td id="t101" class="style1"> <button onclick='batton("src=\"http:\//www.vesti.ru\/video1.asx?vid=onair\"")'> test</button> </td> <td class="style3"> <button onclick="batton(10002)">test1</button> </td> <td class="style2"> <button onclick="batton(10003)">test2</button> </td> </tr> </table> </body> </html>
|
То что нужно получить http://s1.ipicture.ru/
То что получилось http://s1.ipicture.ru/Gallery/Viewfull/3703520.html
|