码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
JavaScript- The Good Parts Chapter 4
Why, every fault’s condemn’d ere it be done:Mine were the very cipher of a function. . .—William Shakespeare, Measure for MeasureThe best thing about ...
分类:编程语言   时间:2014-10-01 14:47:31    阅读次数:190
toString() 方法
举例javascript的几种变量格式(string,array,function,date,number,boolen )toString()输出结果参考。示例1 Numbervar num1 = 10;document.write(num1.toString(2)); //输出1010docum...
分类:其他好文   时间:2014-10-01 14:46:01    阅读次数:124
ajaxpro的ajax函数内不能使用session
<divid="mq"style="width:100%;height:18px;overflow:hidden;border:1pxsolid#ffffff"onmouseout="iScrollAmount=1">轻轻的我走了,正如我轻轻的来;<br/>我轻轻的招手,作别西天的云彩。<br/>那河畔的金柳,是夕阳中的新娘;<br/>波光里的艳影,在我..
分类:其他好文   时间:2014-10-01 00:47:30    阅读次数:327
JavaScript入门:006—JS函数的定义
JS函数的声明。声明函数的格式如下:function 函数名(参数列表){ //函数语句; return 返回值; }来看具体的函数声明。1、普通函数 function ShowHint() { alert("普通函数"); } 2、带参数的函数 function ShowResult(obj) { //处理语句 retu...
分类:编程语言   时间:2014-10-01 00:11:10    阅读次数:239
leetcode--two sum
Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of th...
分类:其他好文   时间:2014-09-30 23:33:10    阅读次数:319
选择排序---直接选择排序算法(Javascript版)
在要排序的一组数列中,选出最小(或者最大)的一个数与第1个位置的数交换;然后在剩下的数当中再找最小(或者最大)的与第2个位置的数交换,依次类推,直到第n-1个元素(倒数第二个数)和第n个元素(最后一个数)比较为止。function sort(elements){ for(i = 0; i < el....
分类:编程语言   时间:2014-09-30 23:17:30    阅读次数:220
.Net之路(十三)数据库导出到EXCEL
.NET中导出到Office文档(word,excel)有我理解的两种方法.一种是将导出的文件存放在server某个目录以下,利用response输出到浏览器地址栏,直接打开;还有直接利用javascript来导出html中的标签。1.javascript导出function AllAreaWor....
分类:数据库   时间:2014-09-30 20:21:50    阅读次数:364
Xcode6 UIWebView与JavaScript交互(issue fix)
这篇文章中,有介绍UIWebView与JavaScript交互,在UIWebView截获JavaScript请求处理,从app的角度,这是JavaScript的Hook请求。  在Xcode6之前的App版本,JavaScript可以这样将Hook请求发送出来: HTML: test linkJavaScript: function xcode6(){ var...
分类:编程语言   时间:2014-09-30 20:00:29    阅读次数:171
bnu oj 34985 Elegant String (矩阵+dp)
Elegant String We define a kind of strings as elegant string: among all the substrings of an elegant string, none of them is a permutation of "0, 1,…, k". Let function(n, k) be the numbe...
分类:其他好文   时间:2014-09-30 18:43:49    阅读次数:248
php抽奖、随机广告算法
我们先完成后台PHP的流程,PHP的主要工作是负责配置奖项及对应的中奖概率,当前端页面点击翻动某个方块时会想后台PHP发送ajax请求,那么后台PHP根据配置的概率,通过概率算法给出中奖结果,同时将未中奖的奖项信息一并以JSON数据格式发送给前端页面。 先来看概率计算函数 function get_rand($proArr) { $result = ''; //...
分类:Web程序   时间:2014-09-30 16:52:49    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!