Home  >  Article  >  php教程  >  imgareaselect + php实现图片裁剪

imgareaselect + php实现图片裁剪

PHP中文网
PHP中文网Original
2016-05-23 17:09:531454browse
  1. php代码

/js/jquery.imgareaselect-0.9.10/css/imgareaselect-default.css 
引用js 
/js/jquery.imgareaselect-0.9.10/scripts/jquery.imgareaselect.min.js 
/js/AjaxFileUploaderV2.1/ajaxfileupload.js

2.php代码

<div>
    <img src=&#39;blank.jpg&#39; id="mainimg">
</div>
<div id="myPreview" >
    <img src="blank.jpg" id="mainimgthumb" />
</div>
    <form name="fmCrop">
        <input type="hidden" name="src_path"  value="" />
        <input type="hidden" name="x1" value="" />
        <input type="hidden" name="x2" value="" />
        <input type="hidden" name="y1" value="" />
        <input type="hidden" name="y2" value="" />
        <input type="submit" name="btnSubmit" class="baseinf_but1" style="display:none" value="确定" />
    </form>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn