Skip to content

Instantly share code, notes, and snippets.

Created October 15, 2010 21:22
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 anonymous/628972 to your computer and use it in GitHub Desktop.
Save anonymous/628972 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Titre</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var paragraphe, lien;
window.onload = function() {
paragraphe = document.getElementById('paragraphe');
lien = document.getElementById('lien');
lien.onclick = function() {
if(paragraphe != null) {
document.body.removeChild(paragraphe);
paragraphe = null;
}
return false;
};
};
</script>
</head>
<body>
<p id="paragraphe">Un texte ...</p>
<a href="#" id="lien">Détruire</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment