0

挨拶!

私はhtmlとjavascriptを学ぶのに苦労している初心者です-ゆっくりとそこに着きます。SimpleModalによって提供されるDIVを印刷しようとしています。ページは次のとおりです。

www.planetsarsfield.com

この「印刷」機能は、下部のレシピボックスにあります。FFではすべてがうまく機能しますが、IE8ではまったく機能しません。私は根本的に間違ったことをしているに違いありませんが、それを見つけることはできません。

何か案は?

乾杯、TY +++++++++++++++++++++++++++++++++++++++++++++++ +

<script type="text/javascript"> 

function PrintElem(elem) 
{ 
    Popup($(elem).html()); 
} 

function Popup(data)  
{ 
    var mywindow = window.open('', 'basic-modal-content', 'height=400,width=600'); 
    mywindow.document.write('<html><head><title>on the grill... latest recipe</title>');
    mywindow.document.write('<link href="PATH/print.css" rel="stylesheet" type="text/css" />')
    mywindow.document.write('</head><body >'); 
    mywindow.document.write(data); 
    mywindow.document.write('</body></html>'); 
    mywindow.document.close(); 
    mywindow.print(); 
    return true; 
} 

</script>
4

2 に答える 2

4

あなたが使用しているウィンドウ名は IE を悲しませます。代わりに「BasicModalContent」を試してください。(「window.open」の 2 番目のパラメーターは、私が話していることです。)

于 2010-04-19T18:09:12.107 に答える
1

これは、他の誰かが「タイトルのダッシュ」の問題を報告した関数の定義ページへのリンクです。Pointy が正しいようです。

http://msdn.microsoft.com/en-us/library/ms536651%28VS.85%29.aspx#6

于 2010-04-19T18:16:20.613 に答える