Delphi System单元-Odd- 判断是否是奇数 原型: function Odd(X:Integer): boolean; Delphi示例: var i: Integer; b: Boolean; begin i := 1; b := Odd(i); {是奇数返回真} ShowMessa ...
function createStyle(){ return"*{padding:0;margin:0;border:0}.loading{width:640px;height:1024px;margin:0 auto}.loadImg{width:640px;height:1024px;anima ...
分类:
Web程序 时间:
2020-07-29 12:39:59
阅读次数:
206
import Vue from 'vue' import Router from 'vue-router' Router.prototype.go = function(t) { this.isBack = true console.log('go ' + this.history.current. ...
分类:
其他好文 时间:
2020-07-29 10:29:00
阅读次数:
83
在vue.js里面,v-for和v-if是可以一起使用作用在某个元素上,网上看到一篇文章说永远不要把v-for和v-if同时用在同一个元素上,感觉有点瞎扯,官网也注明了可以一起使用的,还把两个指令的优先级给说明了: 当v-if和v-for一起使用时,v-for的优先级更高,为了方便理解举个栗子: < ...
分类:
Web程序 时间:
2020-07-29 10:10:17
阅读次数:
89
前言 异步操作对于前端开发而言必不可少,尤其和后端进行交互的时候,项目有时需要多个异步操作串联来进行运算,而我们通常会选择把其封装起来作为公用的方法,此时便要return返回值。 问题 function getProm() { return Promise.resolve(ajax_method() ...
分类:
其他好文 时间:
2020-07-29 00:45:12
阅读次数:
76
对象 <script> var obj = { name: 'zsf', sex: 'nan', age: 33, sayHi:function() { console.log('Hi~~') } } console.log(obj.name) obj.sayHi() </script> var o ...
分类:
Web程序 时间:
2020-07-28 22:29:44
阅读次数:
102
function randomString(n) { let str = 'abcdefghijklmnopqrstuvwxyz9876543210'; let tmp = '', i = 0, l = str.length; for (i = 0; i < n; i++) { tmp += str ...
分类:
其他好文 时间:
2020-07-28 22:29:25
阅读次数:
76
navigator.app.exitApp(): document.addEventListener("deviceready", function() { console.log("deviceready"); document.addEventListener("backbutton", fun ...
分类:
移动开发 时间:
2020-07-28 22:22:34
阅读次数:
101
e.subject.part.findLinksInto().each(function (node) { console.log(node.data); that.myDiagram.model.setDataProperty(node.data, "prevSeqId", 1); }); ...
分类:
Web程序 时间:
2020-07-28 22:07:16
阅读次数:
112
函数 <script> function sum_(a,b) { return a + b } c = sum_(3,4) console.log(c) </script> //匿名函数 var sum2 = function(a,b) { return a + b } d = sum2(3,1) ...
分类:
Web程序 时间:
2020-07-28 17:18:52
阅读次数:
82