复制代码代码如下:
<! Doctype html>
<html lang = "en">
<Evista>
<meta charset = "utf-8">
<title> documento </title>
</ablo>
<Body>
<input type = "text" id = "msg">
<a href = "#" id = "resultado"> 提交 </a>
<div id = "show"> </div>
<script src = "jQuery1.11.js"> </script>
<script>
$ (function () {
var flag = true;
$ ("#resultado"). on ('hacer clic', function () {
if (flag) {
bandera = falso;
}demás{
devolver;
}
$ ("#show"). html ('<p>'+$ ("#msg"). val ()+'</p>');
});
})
</script>
</body>
</html>
¡Tan fácil!