当前位置: 代码迷 >> Ajax >> ajax示范3
  详细解决方案

ajax示范3

热度:259   发布时间:2012-09-04 14:19:30.0
ajax示例3
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript" src="js/prototype1.6.js"></script>
		<script type="text/javascript">
			function showNews(url){
			   new Ajax.Updater(
				 "news",//div元素的id
				 url,//请求的url
				 {
				   method:"post"
				 }
			   );
			}
		</script>
	</head>
	<body>
		<input type="button" value="娱乐新闻" onmouseover="showNews('yule.jsp')"/>
		<input type="button" value="经济新闻" onmouseover="showNews('jingji.jsp')"/>
		<div id="news"></div>
	</body>
</html>

?

  相关解决方案