Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script type="text/javascript"
- src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.j
- s"></script>
- <title>EXERCICE 1 : Manipulation de JQUERY</title>
- </head>
- <body>
- <button type ="button" onclick="reset()">reset</button>
- <button type ="button" onclick="ajoute()">add text</button>
- <button type ="button" onclick="duplique()">clone</button>
- <button type ="button" onclick="wrap()">wrap</button>
- <button type ="button" onclick="oddGreen()">odd green</button>
- <br><br>
- <p>Contenu d'origine</p>
- <script type="text/javascript">
- function ajoute(){
- $("p:first").append("...Contenu ajoute");
- }
- function duplique(){
- $("p:first").clone()
- .insertAfter("p:last")
- .css("backgroundColor", "lightblue");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement