欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JS阻止用戶多次提交示例代碼

 更新時間:2014年03月26日 16:05:46   作者:  
這篇文章主要介紹了JS如何阻止用戶多次提交,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

<!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!

相關(guān)文章

最新評論