首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

click事件,该怎么处理

2013-04-02 
click事件我写了一个div,名字是buybutton,属性是:.buybutton{ width: 89pxheight: 24pxbackground: url(

click事件
我写了一个div,名字是buybutton,属性是:

.buybutton{ width: 89px;
height: 24px;
background: url(${ initParam.resource }/image/button1.png);
background-position: bottom;
float: right;
margin-top: 15px;
margin-right: 10px;}
.buybutton:hover{ background-position:center}
.buybutton:active{ background-position:top}
,现在我想点击这个div后跳转运行
${ pageContext.request.contextPath }/customer!querystore.action?tp_id=${stores.tp_id}
这个,那我在javascript里该怎么写这个click事件,求帮忙
[解决办法]

$(".buybutton").click(function(){
window.location.href = '${ pageContext.request.contextPath }/customer!querystore.action?tp_id=${stores.tp_id}';

})

这样?

热点排行