您的位置:首页 > Web前端 > JQuery

jquery 实现页面动态消息显示

2015-10-26 19:53 645 查看
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
a{text-decoration: none;}
#showinfo{word-break:break-all; width:200px;}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){

$(":button").click(function(){
var v1=$("#text1").val();
$("#showinfo").html("        "+v1)
});
});
</script>
</head>
<body>
<div class="d1">
<div><img alt="" src="js/1.jpg" width="200" height="50"></div>
<div class="d2"><p>
<a href="http://www.baidu.com">宇宙的一切</a>
</p></div>
<div id="d3">
<marquee direction="up" scrollamount="2" style="height: 200px;">
<div id="showinfo">        
这个专题已经被N多机构做过N多遍了,
但历史频道做的非常出色,在讲述人类探索宇宙的历史故事的时候,
严谨详实地叙说了人类对宇宙的不懈探索,
同时将已经了解和尚未了解的宇宙奥秘一一展现出来,真的秉承了历史频道的传统。
特别是《火星》不知道被做过多少次了,但历史频道做来,给人感觉耳目一新,
里面介绍了2007年最新的资讯。</div>
</marquee>
</div>
</div>
<br><br><br><br><br><br>
<textarea rows="5" cols="39" id="text1"></textarea><br>
<input type="button" value="change">
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: