复制代码代码如下:
<! doctype html>
<html lang = "en">
<head>
<meta charset = "utf-8">
<title> Documento </title>
</head>
<Body>
<input type = "text" id = "msg">
<a href = "#" id = "resultado"> 提交 </a>
<div id = "show"> </div>
<script src = "jQuery1.11.js"> </script>
<Cript>
$ (function () {
var flag = true;
$ ("#resultado"). on ('clique', function () {
if (flag) {
bandeira = false;
}outro{
retornar;
}
$ ("#show"). html ('<p>'+$ ("#msg"). val ()+'</p>');
});
})
</script>
</body>
</html>
Tão fácil!