Javascript 我想在jquery中使用imgareaselect
我是jquery新手,我的新任务是“jquery中的imgareaselect”。 我是指。 但我缺少理解逻辑的地方。 请帮我创建“imgareaselect” 现在我的建议是:Javascript 我想在jquery中使用imgareaselect,javascript,jquery,img-area-select-jquery,Javascript,Jquery,Img Area Select Jquery,我是jquery新手,我的新任务是“jquery中的imgareaselect”。 我是指。 但我缺少理解逻辑的地方。 请帮我创建“imgareaselect” 现在我的建议是: <!DOCTYPE html> <html> <head> <script src="http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.pack.js"> </
<!DOCTYPE html>
<html>
<head>
<script src="http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.pack.js"> </script>
<script src="http://odyniec.net/projects/imgareaselect/css/imgareaselect-animated.css"></script>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
</head>
<body>
<img id="photo" src="https://www.google.com/images/srpr/logo11w.png" />
<script>
$('img#photo').imgAreaSelect({
handles: true,
onSelectEnd: function (img, selection) {
alert('width: ' + selection.width + '; height: ' + selection.height);
}
});
</script>
</body>
</html>
$('img#photo')。imgAreaSelect({
是的,
onSelectEnd:功能(img,选择){
警报('宽度:'+selection.width+';高度:'+selection.height);
}
});
HTML w/JAVASCRIPT
...
<head>
<script src="http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.pack.js"></script>
<script src="http://odyniec.net/projects/imgareaselect/css/imgareaselect-animated.css"></script>
</head>
<body>
<img id="photo" src="https://www.google.com/images/srpr/logo11w.png" />
<script>
$('img#photo').imgAreaSelect({
handles: true,
onSelectEnd: function (img, selection) {
alert('width: ' + selection.width + '; height: ' + selection.height);
}
});
</script>
</body>
...
。。。
$('img#photo')。imgAreaSelect({
是的,
onSelectEnd:功能(img,选择){
警报('宽度:'+selection.width+';高度:'+selection.height);
}
});
...
试试看,然后在上面做实验。阅读文档,您可以看到这些限制。欢迎使用SO。有密码吗?你试过什么了吗?实际上我不能为这个准备html代码…1:下载插件,然后2:标题部分的链接。3:脚本功能。现在?……你看过文件了吗?很简单,在输入框中加载数据需要更多的工作。不管脚本中给出了什么id,都要在html中将该id赋给image元素。请浏览文档。我编辑了我的问题,请查看。应该注意,
引用的是级联样式表,应该由
引用。