比如一个hello world程序,在文本框输入内容之前,网页页面上内容为hello world,在文本框输入“您好”时,单击按钮,显示内容则为”hello world 您好“,最好是纯静态web应用!
<script language="JavaScript">
function Display()
{
var name = $(".username").val();
$("h1").html("hello world" + name);
}
</script>
<input type="button" value="查看" onclick="Display()"><br/>
<h1></h1>
<br/>
<div id="ad_wordle_01" class="public_ad"></div>
<h3 class="tp09 pt10 tp05"></h3>
<h3 class="tp09 tp05 pb10"></h3>
<p class="tp03 qw03 tp05 sumry"></p>
改下这里面的内容就行!
文本框内容显示在指定地方:就是一个dom内容转移的操作,使用Jquery获取原生js都很好实现,配合具体js事件实现。具体操作如下:
//假定文本框的id='mytext',指定显示区域的id='show'你会错意思了,不是把每次结果相加,而是每次查询的结果都是一对一的!
追答//那就把加号去掉就行了为空的时候结果不会清除,即前一次结果被保留!
追答现在就是这样的哦。
追问要得需求是全部清空,也就是记录不要被保留,一切回到初始