年底没什么项目做了,整理下最近做的网站使用到的bootstrap知识 一、导入bootstrap样式和脚本 <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <script src="js/bootstrap
分类:
其他好文 时间:
2016-01-27 17:22:17
阅读次数:
183
<script> function twoIndex(val, arr) { var start = 0, end = arr.length - 1, middle = Math.floor((start + end) / 2); while (arr[middle] !== val && end
分类:
编程语言 时间:
2016-01-27 15:49:12
阅读次数:
171
lua命令:#enter shelllua#excute script filelua xxx.lualua脚本:#!/usr/local/bin/lua核心概念:As a extension language, Lua has no notion of a 'Main’program: it on...
分类:
其他好文 时间:
2016-01-27 14:26:15
阅读次数:
200
推荐的是js的script标签放在body的末尾,标签之前,包含在body内! 这样写的好处:1.避免因为加载(下载)脚本或脚本运行过慢,阻塞页面。2.防止脚本运行时,页面未加载完成,造成script要操作的DOM结点没有加载完成而出错。知乎大牛的见解:为什么把 Script 标签放在 bod...
分类:
Web程序 时间:
2016-01-27 14:25:52
阅读次数:
139
首先:jsonp是json用来跨域的一个东西。原理是通过script标签的跨域特性来绕过同源策略。经过测试实验:发送端:$.ajax({ type : "post", url : "ajax.php", dataType : "jsonp", jsonp: "callback...
分类:
Web程序 时间:
2016-01-27 12:43:08
阅读次数:
135
首先:jsonp是json用来跨域的一个东西。原理是通过script标签的跨域特性来绕过同源策略。发送端:$.ajax({ type : "post", url : "ajax.php", dataType : "jsonp", jsonp: "callback",//传递给...
分类:
Web程序 时间:
2016-01-27 12:39:29
阅读次数:
163
.同源策略如下:URL说明是否允许通信http://www.a.com/a.jshttp://www.a.com/b.js同一域名下允许http://www.a.com/lab/a.jshttp://www.a.com/script/b.js同一域名下不同文件夹允许http://www.a.com:...
分类:
其他好文 时间:
2016-01-26 18:36:45
阅读次数:
270
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web.Security;using System.Web.Script.Serialization;usin...
分类:
微信 时间:
2016-01-25 12:49:18
阅读次数:
301
看:http://jqueryui.com/draggable/下面我做了一个Demo.注意js放的位置,要放的靠近,若被其他覆盖,则无法移动。比如:<divid="move">可移动的DIV</div>引入jquery.js,jquery-ui.js,<scriptscr="http://code.jquery.com/jquery-1.10.2.js"></script>..
分类:
移动开发 时间:
2016-01-24 19:55:24
阅读次数:
286
在head中添加如下:<!-[ifIE]><scriptsrc="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]->在CSS3后添加behavior:url(ie-css3.htc);以上两种方法可以在IE6+中使用HTML5和CSS3,兼容大部分
分类:
Web程序 时间:
2016-01-24 19:51:59
阅读次数:
166