码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
button的默认type居然是submit
今天使用了html中的button标签,用js写了一点代码来完成onclick实践,当我点下它的时候,它不仅执行了我写的function,还把表单给提交了,一查它的button居然是sumbit。然后我把自己所有的浏览器都测试了一遍,包括IE 11、Firefox 32、chrome 38,发现这些...
分类:其他好文   时间:2014-10-19 12:59:11    阅读次数:184
PHP中调用move_uploaded_file函数提示failed to open stream和 Unable to move
在做一个PHP文件上传系统的时候,使用move_uploaded_file进行文件上传,提示下面两个warning,不能成功上传文件Warning: move_uploaded_file(upload/songshu_rgb.gif) [function.move-uploaded-file]: f...
分类:Web程序   时间:2014-10-19 12:52:49    阅读次数:162
扩展jquery的Ajax
扩展jquery中的ajax对象,使得项目中的异常,调用提示信息统一处理,代码如下: ;(function($){ //备份jquery的ajax方法 var _ajax=$.ajax; //重写jquery的ajax方法 $.ajax=function(opt){ //备份opt中e...
分类:Web程序   时间:2014-10-19 11:43:42    阅读次数:150
javascript 哈夫曼树构造
function Node(data) { this.data = data; this.left = null; this.right = null; } /*测试用例*/ var datasarray = [1, 54, 23, 64, 53, 87, 97]; function createHufuTree(datasarray) { var nodes = []; /...
分类:编程语言   时间:2014-10-19 11:38:02    阅读次数:169
JavaScript设计模式: 接口模仿
JavaScript中模仿接口有三种方法1. 注释法/*interface Composite(){ function add(child); function remove(child); function getChild(index);}interface FormItem(...
分类:编程语言   时间:2014-10-19 11:24:53    阅读次数:186
datatable1.10服务器断分页
接着上一篇datatable1.10的新特性,出于工作需求,我们需要进行服务器端分页。 本人还是直接拿代码。。然后给代码加上注释。。如果有疑问可以指点一二。。。 $(document).ready(function() { var table = $('#example').DataTable({ "columns" : _tableCols, "createdRow" : xxxxxx...
分类:其他好文   时间:2014-10-19 09:02:06    阅读次数:128
http2.4 的启动脚本
#!/bin/bash# httpd starts/stop the at daemon#chkconfig: 345 61 29#description: runs apache as httpd#Source function library. /etc/init.d/functionsexec...
分类:Web程序   时间:2014-10-19 07:56:18    阅读次数:226
jquery:iframe里面的元素怎样触发父窗口元素的事件?
例如父窗口定义了一个事件。 top: $(dom1).bind('topEvent', function(){}); 那么iframe里面的元素怎样触发父窗口dom1的事件呢?这样吗? $(dom1, parent.document).trigger('topEvent'); 看似正确,实则误导人。...
分类:Web程序   时间:2014-10-19 02:38:41    阅读次数:221
Two Sum
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 the two n...
分类:其他好文   时间:2014-10-19 01:13:19    阅读次数:210
在Python中使用help帮助
在Python中使用help帮助>>> import numpy>>> help(numpy.argsort)Help on function argsort in module numpy.core.fromnumeric:argsort(a, axis=-1, kind='quicksort',...
分类:编程语言   时间:2014-10-19 00:02:58    阅读次数:359
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!