1、什么是事件冒泡 在页面上可以有多个事件,也可以多个元素响应同一个事件。假设页面上有两个元素,其中一个元素嵌套在另一个元素里,并且都被绑定了click事件,同时元素也绑定了click事件,完整代码如下: 外层div元素 内层span元素 外层div ...
分类:
其他好文 时间:
2014-07-09 22:22:42
阅读次数:
364
The Game
Description
One morning, you wake up and think: "I am such a good programmer. Why not make some money?'' So you decide to write a computer game.
The game takes place on a rectangular...
分类:
其他好文 时间:
2014-07-06 09:02:34
阅读次数:
287
最小生成树+枚举。
题意是说在一个无向图的所有生成树中,选取最小“苗条”值的。
“苗条”的定义是生成树中权值最大的边 减去 权值最小的边的 值。
我的思路是 排序,然后从 0~m枚举。每次必然加入枚举的那一条边。
然后 向其左右分别 选择边加入。直到构成生成树,不能就返回INF。
其实我感觉我的代码有点问题,我没有比较左右当中谁更 接近 枚举的那条...
分类:
其他好文 时间:
2014-07-06 08:15:29
阅读次数:
190
题目如下:
Problem D: XYZZY
ADVENT: /ad?vent/, n.
The prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an attempt at computer-refereed fantasy...
分类:
其他好文 时间:
2014-07-03 18:09:47
阅读次数:
211
Computer Virus on Planet Pandora
Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/128000 K (Java/Others)
Total Submission(s): 2480 Accepted Submission(s): 688
Problem Descrip...
分类:
Web程序 时间:
2014-07-03 17:18:25
阅读次数:
314
首先 after() 是追加在元素外边而append() appendTo()是追加在元素里面。$(selector).after(content)$("span").after("aa") 结果是aa 不是aa而如果用 append()$("span").append("aa")结果是aaappe...
分类:
移动开发 时间:
2014-07-02 19:51:36
阅读次数:
201
span{ display: block; background: #f4f4f4; color: #333; font-size: 14px; -webkit-border-radius: 20px; border-radius: 20px; text-a...
分类:
其他好文 时间:
2014-07-02 18:38:23
阅读次数:
473
过滤HTMLpublic static string NoHTML(string html){ string[] strArray2 = new string[] { "font", "span", "div", "p" }; foreach (string str in strArra...
分类:
Web程序 时间:
2014-07-01 12:50:38
阅读次数:
177
题意:有n种病毒序列(字符串),一个模式串,问这个字符串包含几种病毒。
包含相反的病毒也算,字符串中[qx]表示有q个x字符。详细见案列。
0
3
2
AB
DCB
DACB
3
ABC
CDE
GHI
ABCCDEFIHG
4
ABB
ACDEE
BBB
FEEE
A[2B]CD[4E]F
Sample Output
0
3
2
...
分类:
Web程序 时间:
2014-07-01 08:29:22
阅读次数:
307
简易计算器(效果如图所示) 第一种方案:采用Javascript+html完成计算器,支持+-*/,结果显示不允许使用input输入域(可以考虑使用《span》) 简易计算器 简易计算器 点击这里 --> //button的onclick事件 --> ...
分类:
编程语言 时间:
2014-06-30 21:49:08
阅读次数:
301