jade ajax,javascript - Ajax with node.js/jade - Stack Overflow

I have a problem with ajax call

Server side:

router.get('/user/letterlist', function(req, res) {

// ... some operations

res.render('userLetterList', { title: 'test', rows : rows? rows: null, pageCount: pageCount,itemCount: itemCount });

});

Client side index.jade

extends layout

block content

div(id="userLettersList")

button(type="button" class="btn btn-success")

{success}

script.

$(".btn").click(function(e){

e.preventDefault();

$.ajax({

url: "/user/letterlist",

success: function(data){

$("#userLettersList").html(data) ;

}

});

});

client side userLetterList.jade

table(id="UserLetters" class="table table-striped table-bordered")

thead

....

The problem is when push on the button to load data into the div, it will retrieve and show, but the page redirect to nowhere with a blank page, after some m-seconds.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
/app/jdk1.8.0_192/bin/java -cp /app/BES-CLUSTER-951/node-172.16.100.235/patch/V9.5.1.2539.002.jar:/app/BES-CLUSTER-951/node-172.16.100.235/patch/V9.5.1.2539.001.jar:/app/BES-CLUSTER-951/node-172.16.100.235/lib/*:/app/BES-CLUSTER-951/node-172.16.100.235/lib/3rd/*: -Dcom.bes.enterprise.stopAgentTimeout=180 -Dclient.ssl.keyStorePassword={AES}PrzBD+FLE0Wheq7AAaghXw== -Dcom.bes.enterprise.nodeagent.process.timeout=180 -Dclient.ssl.keyStore=${com.bes.installRoot}/conf/security/client.p12 -Dclient.ssl.keyStoreType=PKCS12 -Dcom.bes.enterprise.startAgentTimeout=180 -Dcom.bes.enterprise.async.event.retainResultTimeout=300 -Djava.security.egd=file:/dev/./urandom -XX:+UnlockDiagnosticVMOptions -XX:MetaspaceSize=1028m -XX:NewRatio=2 -XX:HeapDumpPath=/toptdata/besServerLog/node-172.16.100.235/logs/dump/ -XX:LogFile=/toptdata/besServerLog/node-172.16.100.235/logs/jvm.log -XX:+HeapDumpOnOutOfMemoryError -XX:-UseVMInterruptibleIO -XX:MaxMetaspaceSize=2048m -XX:+LogVMOutput -Xmx4096m -Xms2048m -server -Djava.endorsed.dirs=/app/BES-CLUSTER-951/node-172.16.100.235/lib/endorsed -Dcom.bes.javaRoot=/app/jdk1.8.0_192 -Dcom.bes.installRoot=/app/BES-CLUSTER-951/node-172.16.100.235 -Dcom.bes.instanceRoot=/app/BES-CLUSTER-951/node-172.16.100.235 -Djava.awt.headless=true -Djava.ext.dirs=/app/jdk1.8.0_192/lib/ext:/app/jdk1.8.0_192/jre/lib/ext:/app/BES-CLUSTER-951/node-172.16.100.235/lib/ext -Djava.net.preferIPv4Stack=true -Djava.library.path=/app/BES-CLUSTER-951/node-172.16.100.235/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib com.bes.enterprise.nodeagent.bootstrap.NodeAgentMain start --startinstances=false --restartinstances=true --monitorinterval=5 --syncinstances=true -instancedir /app/BES-CLUSTER-951/node-172.16.100.235 -verbose false -debug false -nodename node-172.16.100.235 -read-stdin true
06-02

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值