window.onbeforeunload?=?function?()?{ ????????????var?n?=?window.event.screenX?-?window.screenLeft; ????????????var?b?=?n?>?document.documentElement.scrollWidt...
分类:
其他好文 时间:
2014-07-26 03:33:57
阅读次数:
161
XML现在已经成为一种通用的数据交换格式,它的平台无关性,语言无关性,系统无关性,给数据集成与交互带来了极大的方便。对于XML本身的语法知识与技术细节,需要阅读相关的技术文献,这里面包括的内容有DOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definit...
分类:
编程语言 时间:
2014-07-26 02:59:27
阅读次数:
258
#div1 {width:100px;height:100px;background:red;filter:alpha(opacity:30);opacity:0.3}
window.onload=function ()
{
var oDiv=document.getElementById('div1');//先获取div元素
oDiv.onmouseover=function (...
分类:
Web程序 时间:
2014-07-26 02:13:07
阅读次数:
279
body { width: 100%; height: 100% }
function aurora(){
alert( document.body.clientHeight );
var canvas = document.getElementById( "sky" );...
分类:
其他好文 时间:
2014-07-26 02:07:46
阅读次数:
219
function getInput() {
var inputs = document.getElementsByTagName("input"); //取得所有的input表单
for (var i = 0; i < inputs.length; i++) { //遍历所有的input表单
var inputNam...
分类:
其他好文 时间:
2014-07-26 02:01:26
阅读次数:
189
1、执行时机:
window.onload:必须等待网页全部加在完毕(包括图片等),然后再执行包裹代码
$(document).ready():只需要等待网页中的DOM结构加载完毕,就能执行包裹的代码
2、执行次数:
window.onload:只执行一次,如果第二次,那么第一次的执行会被覆盖
$(document).ready():可以执行多次,第N次都不会被上一次覆盖...
回到顶部 JS 代码backTop =function(){if(!document.querySelector("#backTop")){return;}document.querySelector("#backTop").addEventListener("click",function(){s...
分类:
Web程序 时间:
2014-07-26 01:10:46
阅读次数:
182
page.evaluate( function() { // find element to send click to var element = document.querySelector( 'span.control.critical.closer' ); // creat...
分类:
Web程序 时间:
2014-07-26 00:11:26
阅读次数:
310
var bgWidth = document.body.clientWidth + 'px', bgHeight = document.body.clientHeight + 'px', alertBgNode = $('.alertMessage...
分类:
其他好文 时间:
2014-07-25 18:58:01
阅读次数:
237
重要概念:某些路径下“只能读,不能写”的原因 iPhone、ipad真机上 Resouces文件夹:是只读的,无法写入。 document 和temp文件夹:可读,可写。@inter PlistMange :NSObject-(void)resourcePathFileRead; //当前工程...
分类:
其他好文 时间:
2014-07-25 13:51:52
阅读次数:
332