Сообщение от ruslite
|
alert(rewrew);
false;
|
это как?
DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div class="example">
<form class="form-inline" id="messageForm">
<input id="nameInput" type="hidden" class="input-medium" value="<?php echo $log_username;?>" />
<input id="canalInput" type="hidden" class="input-medium" value="<?php echo $name;?>" />
<div id="messageInput" name="messageInput1" placeHolder="Ваше сообщение">12345</div>
<input type="submit" value="Отправить" onclick="$('.emoji-wysiwyg-editor').html('')"/>
</form>
</div>
<script>
flag = true;
$( "#messageForm" ).submit( function() { var rewrew = $('#messageInput').html()
if(!flag) return false;
flag = false;
window.setTimeout(function () {
flag = true
}, 3000) ;
alert(rewrew);
return false;
});
</script>
</body>
</html>