You can’t view a web page’s source, and you can’t Command+F to search for text on the page, but you sure can get a debugging console to see the errors on the page. Here’s how: Find and open th...

0

js在ipad上实现div拖动

Posted in JavaScript at 二月 29th, 2012 / No Comments »

组件地址:http://www.gotproject.com/blog/post2.html <script src=”webkitdragdrop.js” type=”text/javascript”></script> <body> <div id=”obj_id” style=”dd”>jjjjjjjjjjjjj...

0

JS判断IPAD浏览器

Posted in JavaScript at 二月 29th, 2012 / No Comments »

<script type="text/javascript"> // <![CDATA[ var bForcepc = fGetQuery("dv") == "pc"; function fBrowserRedirect(){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserA...

0

ipad中的iframe

Posted in JavaScript at 二月 15th, 2012 / No Comments »

项目要在ipad下测试,发现iframe设置的高度和宽度都没用了,被里面的内容撑开了,怎么办。 网上搜了下比较适应的方法 1.在iframe外包个div 设置div的高度、宽度和overflow:auto; 如果这时两个手指touchmove还是不...

1

Javascript实现PHP的strip_tags

Posted in JavaScript at 二月 15th, 2012 / 1 Comment »

<p>测试strip_tags</p> <br /> <a name=”strip_tags” id=”strip_tags”/> <a href=”http://yuenshui.com/”>野马</a> <!– 看不到 –> <script> /* * 过滤字...

0

iPad上的MouseEvent

Posted in JavaScript at 二月 13th, 2012 / No Comments »

iPad上没有鼠标,所以手指在触发触摸事件(TouchEvent)的时候,系统也会产生出模拟的鼠标事件(MouseEvent)。 这对于普通网页的浏览需求而言,基本可以做到与PC端浏览器无明显差异。但是如果你正在做一款与用户...

由于需要写个函数,既可以加载css,又可以加载js,所以对各主流浏览器对加载js、css后是否触发onload事件做了个测试。当然,为了兼容,首先要考虑的是会用到onload和onreadystatechange,但他们并不是万能的。加载...

<!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <meta name="WT.qs_dlk" content="2gKNGwrIZz0AACaJT@cAAAAG"/> <meta name="WT.qs_shmv" content="hv201008...

Minimize HTTP Requests tag: content 80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scr...

        用户登录这一块有个图片验证码,Firefox中如果用户输错密码,会提示密码错误,然后点击浏览器的后退按钮退回到这个登录界面。可是这个时候验证码的图片还是刚才那一张。         经过测试发...