imgPreivew 实现链接预览图片

<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Insert title here</title>
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script type="text/javascript" src="js/imgpreview.full.jquery.js"></script>
 </head>
 <body>
  <ul id="first">
   <li>
    <a class="img" href="img/a.gif">The Sun</a>
   </li>
  </ul>

  <script type="text/javascript">
 //<![CDATA[
 jQuery.noConflict();
 ( function($) {
  $('#first a.img').imgPreview( {
   imgCSS : {
    width :200,
    height :200
   }

  });
 })(jQuery);
 //]]>
</script>

 </body>
</html>

 

 

 

来自:http://blog.sina.com.cn/s/blog_6145ed810100hf6i.html

你可能感兴趣的:(JavaScript,html,jquery,Blog,sun)