当我点击加载按钮时,在IE 9中使用水印插件的我的preview.php文件无法正确加载。它适用于其他浏览器。我通常与Jquery有这些浏览器兼容性问题。我该怎么办呢。 我有一个posthttp2.php文件
<html>
<body>
<form method="post" enctype="multipart/form-data" action="preview3.php">
<input id="button" type="button" value="load"/>
</form>
<div id="feedback"> </div>
<script type="text/javascript" src="js/jquery.js" > </script>
<script type="text/javascript" src="js/ajax3.js" > </script>
</body>
<html>
And the Ajax file is ajax3.js
$(document).ready(function(){
$('#button').click(function() {
$('#feedback').load("preview3.php");
});
)};
I have a preview.php file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JQuery Image Watermark</title>
<link type="text/css" href="css/proj.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<link type="text/css" href="css/jquery-ui-1.8.6.custom.css" rel="stylesheet" />
<script type="text/javascript" src="jss/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jss/jquery-ui-1.8.6.custom.min.js"></script>
<script type="text/javascript" src="jss/jquery-watermarker-0.3.js"></script>
<style type="text/css">
div.watermark
{
border:1px dashed #000;
}
img.watermark:hover{
cursor:move;
}
</style>
<script type="text/javascript">
//<!--
$(document).ready(function(){
$('#watermarked').Watermarker({
watermark_img: 'a.png',
onChange: showCoords
});
});
function showCoords(c)
{
$('#x').val(c.x);
$('#y').val(c.y);
$('#w').val(c.w);
$('#h').val(c.h);
$('#a').val(c.opacity);
};
//-->
</script>
</head>
<body>
<h1>Image Watermark !</h1>
<br />
X: <input type="text" id="x" name="x" value="" style="width:30px;" />
Y: <input type="text" id="y" name="y" value="" style="width:30px;" />
W: <input type="text" id="w" name="w" value="" style="width:30px;" />
H: <input type="text" id="h" name="h" value="" style="width:30px;" />
A: <input type="text" id="a" name="a" value="" style="width:30px;" />
<hr />
<img src="1.jpg" id="watermarked" />
<br />
Opacité: <div id="sliderdiv" style="width:200px;"></div>
<br />
<br />
</body>
</html>
答案 0 :(得分:0)
实际上,如果这是确切的代码,您就会错过关闭的HTML代码,是的,您应该定义一个正确的doctype:
第一个html文档代码:
<html>
应该是:
</html>