0
为什么这是行不通的INTERNET EXPLORER:Jquery id选择器无法在INTERNET EXPLORER上工作
我有这个html输入标记。我打电话给我的js功能在toprint元素上做一些工作人员。在FF中,铬可以工作。但在IE浏览器中,我收到“缺少参数错误”。
<input type="button" onclick="PrintElem('#ToPrint')" value="<?php echo t("DOWNLOAD");?>" />
的div元素是某处页面,如:
<div class="letterBody paddingLg LmarginXlg" id="ToPrint">
<p>bla bla</p>
</div>
<script type="text/javascript" language="javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'Press Release');
mywindow.document.write('<html><head><title><?php echo $data->title ;?></title>');
mywindow.document.write(' <link rel="stylesheet" type="text/css" media="all" href="<?php echo base_path().$directory; ?>/css/printA4.css"/>');
mywindow.document.write('</head><body onload="" class="printA4">');
mywindow.document.write(data);
/*
$(document).ready(function() {
this.title = '<?php echo $data->title ;?>'
var salonLogo = $("#salonLogo").attr("src")
var imgSalonLogo = salonLogo.search("salonlogo")
if(imgSalonLogo == -1){
$("#salonLogo").attr("src","")
}
})
*/
mywindow.document.write('</body></html>');
mywindow.document.close();
mywindow.print();
return true;
}
$(document).ready(function() {
this.title = '<?php echo $data->title ;?>'
})
</script>
请描述你的错误。 IE版本??错误哪个行号?格式正确 – diEcho 2011-05-10 08:16:37
但在ie上会发生什么?没有弹出?弹出错误的值? – ariel 2011-05-10 08:17:48