【发布时间】:2013-01-10 06:42:20
【问题描述】:
我想在 div 内拖动图像,我使用 jQuery UI 可拖动功能做到了这一点。
HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="jQuery/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="jQuery/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
$('#dragme').draggable();
});
</script>
</head>
<body>
<div id="container" style="width:300px;height:300px;overflow:hidden;margin:auto;border:solid 1px black">
<img src="http://img.thesun.co.uk/multimedia/archive/01650/greats_1650266a.jpg" id="dragme" />
</div>
</body>
</html>
你可以看到演示here。 工作正常,但是,当我在 IIS 上托管相同的内容时,问题就开始了。 当我使用 http://localhost/mysite 时,该页面在 Chrome 和 IE 上运行良好,但是当我在 IE 上使用 http://servername/mysite 时,该页面会被折腾。 整个图像显示在 div 上。 (Snapshot)。 不过,我仍然可以拖动图像。
我不明白为什么会这样。我过去也遇到过 http://localhost/mysite 和 http://servername/mysite 的行为不同的问题。
谁能解释一下为什么会这样?提前致谢。
【问题讨论】:
-
您好,您可以提供您的在线服务器链接吗?
-
我在 Intranet 上,对不起 :(
标签: jquery asp.net jquery-ui iis jquery-ui-draggable