"; }}/* * 分析: 由一周为一个轮回。
如果刚好有偶数个周,数组高大于宽,则有$col/2次轮回,若宽大于高则 有$row/2个轮回。 如果未奇数个周,则有$len/2+1个周。 */function
Printarrayincircle($arr) { $col = count...
分类:
其他好文 时间:
2014-05-10 08:10:37
阅读次数:
285
一、JS的三种最常见的对话框//======================
JS最常用三种弹出对话框 ======================== //弹出对话框并输出一段提示信息 function ale() {
//弹出一个对话框 alert("提示...
分类:
Web程序 时间:
2014-05-09 23:30:08
阅读次数:
559
那么首先我们来简单的看一下最正统的 jQuery 插件定义方式:(function ($) {
$.fn.插件名 = function (settings) { //默认参数 var defaultSettings = { } /...
分类:
Web程序 时间:
2014-05-09 23:15:29
阅读次数:
393
Function cuttextlen(intext, lens)
If Len(intext)
cuttextlen = intext
Else
tmptext = intext
GetTexts = ""
Do While Not Len(tmptext)
GetTexts = GetTexts + Left(tmptext, lens)
tmptext = Right...
分类:
其他好文 时间:
2014-05-09 22:22:08
阅读次数:
320
前几天要写一个东西里面有用到读文件的。
可是我不想用FSO,我怕有的空间不支持。
可是网络上找了半天没有找到一个不是用FSO写的。
还是自己做了一个。
我记得以前在做无组件上传,并保存文件的时候有用到stream
我发现有一个LoadFromFile的方法。可以读取文件。
下面是我的代码。
function readfile(URL,chartype)
set srmObj...
分类:
其他好文 时间:
2014-05-09 22:15:49
阅读次数:
277
如何获得 Windows 操作系统的版本
很多时候我们需要知道Windows操作系统的版本,使用下面这个API函数可以做到。
Option Explicit
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As ...
Generate ParenthesesGiven n pairs of parentheses,
write a function to generate all combinations of well-formed parentheses.For
example, given n = 3, a...
分类:
其他好文 时间:
2014-05-09 20:09:32
阅读次数:
333
/*验证邮箱格式*/ function checkEmail(strEmail){
if(!/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ .test(strEmail)){ return
false; } else ...
分类:
Web程序 时间:
2014-05-09 20:02:19
阅读次数:
482
var wait = 60; function time(o) { if (wait == 0) {
$(o).attr("disabled", false); $(o).val("获取验证码"); wait = 60; ...
分类:
Web程序 时间:
2014-05-09 19:25:41
阅读次数:
569
再来看一个选择li列表的例子:点击li中的任意项,被点击的li高亮显示: 6.3css类和样式
{{restaurant.name}}{{restaurant.food}}{{restaurant.price}} function Restauran...
分类:
Web程序 时间:
2014-05-09 19:25:15
阅读次数:
447