on click 跳转其他页面

zhaoyy12345 2018-05-22 01:10:56
$("#pPower").on("click",".police",function () {

var id = $(this).parent().data('id').toString();
var url = "?stationName="+areaName2+"&stationId="+area;
window.parent.openIframWithdata(id,url);
})

下面是接口
function getpPower() {
$.ajax({
type : 'post',
url :"home/getStationInfoTotal.do", //left
async: true,
dataType:'json',
data :{
type:$("#type").val(),
area:area,
},
success :function(d,status){
if(d.data == null){
return ;
}
pPower.minjing = d.data.m;
pPower.wujing = d.data.w;
pPower.xiejing = d.data.x;
pPower.qita = 0;
pPower.jingli = 0;
pPower.cheliang = d.data.c;
}});


<div id="pPower" style="position: relative; cursor: pointer;" data-id="10101">
<p class="service">1<span>{{m}}人次</span></p>
<p class="service">2<span>{{w}}人次</span></p>
<p class="service">3<span>{{x}}人次</span></p>
<p class="service">4<span>{{q}}人次</span></p>
<p class="service">5<span>{{j}}人次</span></p>
<p class="service">6<span>{{c}}车次</span></p>
</div>


我现在想点击 接过来的数据数据后跳转到其他页面,要怎么写好?求助。。。
...全文
999 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_39854764 2018-05-24
  • 打赏
  • 举报
回复
你是想要在点击事件里面写跳转吗? 很多跳转方法: window.location.href=url;
zhaoyy12345 2018-05-22
  • 打赏
  • 举报
回复
引用 1 楼 bbboy8205 的回复:
想问什么。。。。。。。。。。
写一段代码..点击数据 然后可以跳转到其他页面
风中的少年 2018-05-22
  • 打赏
  • 举报
回复
想问什么。。。。。。。。。。

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧