JSはユーザーが何回も模範コードを提出するのを阻止します。


 
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<input type="text" id="msg">
<a href="#" id="result"> </a>
<div id="show"></div>
<script src="jquery1.11.js"></script>
<script>
$(function(){
var flag = true;
$("#result").on('click',function(){
if(flag){
flag = false;
}else{
return;
}
$("#show").html('<p>'+$("#msg").val()+'</p>');

});
})
</script>
</body>
</html>
so easy