---
title: "jquery图片预览功能"
author: "jyangzi5"
date: "2014-01-07T17:13:05Z"
tags: []
categories: ["Web前端"]
slug: "jquery"
draft: false
lastmod: "2014-01-14T01:50:31Z"
id: 2000451
url: "https://jyangzi5.iteye.com/blog/2000451"
---

&lt;!DOCTYPE html&gt;  
&lt;html&gt;  
&lt;head&gt;  
  &lt;script type="text/javascript" src="/jquery/jquery.js"&gt;&lt;/script&gt;  
&lt;/head&gt;

&lt;body&gt;  
  &lt;p&gt;&lt;input type="button" value="1"&gt;&lt;/p&gt;  
  &lt;p&gt;&lt;input type="button" value="2"&gt;&lt;/p&gt;  
  &lt;p&gt;&lt;input type="button" value="3"&gt;&lt;/p&gt;

&lt;script&gt;  
$(document).ready(function(){  
 

   $("p").click(function(){  
     
   var next = $(this).next();

    var temp = $(this).remove();  
        next.after(temp);

   
});

});

&lt;/script&gt;

&lt;/body&gt;  
&lt;/html&gt;