<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <p id="opp"> 你好</p> <input type="text" name="text1" id="nini"> <input type="submit" name="submit1" id="haha"> <script src="jquery-1.5.2.min.js"> $('#haha').click(function(){ $('#opp').text($('#nini').value()); }); </script> </body> </html>
怎样才能把input输入的东西替换掉p里面的text呀?
Menoen
逆光之羽
慕的地6079101