转自http://yaoqianglilan.blog.163.com/blog/static/70978316201091810435251/ 本人亲测setcookie() getcookie()非常好用,其它待测试 1.js设置cookie //set cookie function setcookie(name,value){ var Days = 30; var exp = new Date(); exp.setTime(exp.g
我们知道通过界面设置字段的change事件,是否是必填,是否可见非常容易.但有时我们需要动态地根据某些条件来设置,这时有需要通过js来动态地控制了. 下面分别介绍如何用js来动态设置. 一.动态设置字段的change事件 // form on load event function onLoad() { init(); pageAttr.delivery_from.addOnChange(deliveryFromChange); pageAttr.type.addOnChange(typ
koa-session2 Middleware for Koa2 to get/set session use with custom stores such as Redis or mongodb with Babel koa-session2 Middleware for Koa2 to get/set session use with custom stores such as Redis or mongodb with Babel If you are not using bab
function setCookie(){ //设置cookie var loginCode = $("#login_code").val(); //获取用户名信息 var pwd = $("#login_password").val(); //获取登陆密码信息 var checked = $("[name='checkbox']:checked");//获取“是否记住密码”复选框 if(checked && checked.le
在routes/news_mian.js 设置了访问news_main.html 的路径 '/',通知设置一个访问news-page.html的子路径'/newspage'子路径.但是在访问loaclhost:3000/news/newspage时静态资源路径前多了一个/news导致不能找到静态资源 app.js var express=require('express'); var app=express(); var path=require('path'); var http=requir