Skip to content

Instantly share code, notes, and snippets.

@memememomo
Created May 19, 2010 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save memememomo/11c1b8d836841eac5519 to your computer and use it in GitHub Desktop.
Save memememomo/11c1b8d836841eac5519 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
alert($("div#wrap").html());
$("p#first").replaceWith("<div><strong>変更後</strong></div>");
alert($("div#wrap").html());
});
</script>
<body>
<div id="wrap">
<p id="first">変更前</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment