1.将下面的js代码单独到一个js文件中,然后在页面中引用 AlertDialog.js //改写js原装的alert样式 var t; var timeclose = 0; var showBackTime = 0; var showTime; window.alert = function (s, a, b, c) { if (s.indexOf("操作失败:[object Object]") >= 0) { return; } if (s == "out"
最近看到项目里一段代码如下: excelObject excel = new excelObject(); if (loadbill.CustomsType == 1) excel.IDownload = new AA(); if (loadbill.CustomsType == 2) excel.IDownload = new BB(); if (loadbill.CustomsType == 3) excel.IDownload = new CC(); if (loadbill.Custom
/*引入模块*/ var http = require('http') var url = 'http://www.cnblogs.com/txxt' var cheerio = require('cheerio') /*过滤函数*/ function filter(html) { var $ = cheerio.load(html) var titleData = []; var title = $('.postTitle').text(); console.log(title) } /*数据