网页基础
-
随机生成成语小游戏数据 2024-07
-
如何修改Chrome浏览器最小字号限制 2016-06
如何修改Chrome浏览器最小字号限制
-
冷知识之HTML 2016-01
浏览器地址栏运行JavaScript代码 这个很多人应该还是知道的,在浏览器地址栏可以直接运行JavaScript代码,做法是以javascript:开头后跟要执行的语句。 示例代码: javascript:alert('hello from address bar :)'); 将以上代码贴到浏览器地址
-
浏览器对onbeforeunload 事件的触发条件 2014-03
问题: IE6多次执行onbeforeunload 调用时机:关闭当前窗口。通过输入一个新的地址或选择一个最喜欢的导航到另一个位置。点击一个锚,指到另一个文档。调用锚。单击方法。调用该文件。写方法。调用该文件。接近方法。调用窗口。接近方法。调用窗口。导航或NavigateAndFind方法。调用位置。更换方法。调用位置。重载方法。指定一个新值的位置。HREF属性。提交表单在指定的地址ACTION通过属性INPUT type = submit按钮控制,或调用形式。提交方法...
-
css transform 2014-01
#example {position: absolute;top: 100px;left: 100px;border: #09F solid 1px;background: #F90;font-weight: 900;color: #FFF;padding: 10px;display: block;width: 200px;height: 200px;margin-top: -1px;margin-left: -1px;transform: rotate(40deg);-o-transform:...
-
针对样式名如果只让ie6看见用*html .head{color:#000;}如果只让ie7看见用*+html .head{color:#000;}如果只让ff看见用:root body .head{color:#000;}如果只让ff、IE8看见用html>/**/body .head{color:#000;}如果只是不让ie6看见用html>body .head{color:#000;} 即对IE 6无效如果只是不让ff、IE8看见用*body .head{color:#000;...
-
CSS透明度大汇总 2013-12
近年来,CSS不透明算得上是一种相当流行的技术,但在跨浏览器支持上,对于开发者来说,可以说是一件令人头疼的事情。目前还没有一个通用方法,以确保透明度设置可以在目前使用的所有浏览器上有效。这篇汇总主要是提供一些CSS不透明的详细介绍,代码示例和解释,以实现这项有用的CSS技术在您的项目中兼容所有浏览器。关于CSS 透明度,有一点需要注意的是,它虽然使用了很多年,但它一直以来都不是一个标准属性。它是一种非标准技术,应该是CSS3规范的一部分。1. 旧的Opacity设置以下代码是Firefox和Sa...
-
google jQuery 1.2.6引用文件<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>google jQuery 1.3.2引用文件<script src="http://ajax.googleapis.com/ajax/libs/jque...
-
javascript掌握正则表达式 2013-11
正则表达式之所以难,主要体现在以下几个方面: 1)正则表达式的符号晦涩难懂2)不支持排版(至少javascript目前还不支持)3)不能设置断点,不能跟踪调试4)没有真正的标准,不同工具所支持的正则表达式有许多细节上的差异下文中如涉及正则表达式符号含义不明,请参阅《javascript正则表达式入门笔记(完整版)》 正则表达式本质上是一整套的处理字符串的模型,帮助人们利用简短的表达式来实现复杂的算法。早期的正则表达式引擎只有三百多行代码,发展到后来也不到1万 行代码...
-
javascript与c#之间的调用 2013-11
(一)JavaScript访问C#函数 方法一:1 、首先建立一个按钮,在后台将调用或处理的内容写入button_click中;2 、在前台写一个js函数,内容为document.getElementById ("btn1")。click ();3 、在前台或后台调用js函数,激发click 事件,等于访问后台c#函数;方法二:1 、函数声明为public后台代码(把public改成protected 也可以) public string ss()  ...
-
js 效率资源损耗 2013-11
少用全局变量。因为js搜索标志的时候,是最后去搜全局变量的。比如我们有个全局变量叫var g;页面读取的时候,会在js 浏览器cache里搜,最后才搜到全局变量集合。所以非常影响效率。少用闭包,因为闭包会把变量存起来,不会自动释放。
-
JSONP 2013-11
浏览器安全模型规定,XMLHttpRequest、框架(frame)等只能在一个域中通信。从安全角度考虑,这个规定很合理;但是,也确实给分布式(面向服务、混搭等等本周提到的概念)Web开发带来了麻烦。 为了实现跨域通信,通常的解决方案有3种: 本地代理:需要一些硬件设施(没有服务器的客户端无法运行),并且带宽和潜伏时间也要加倍(远程服务器-代理服务器-客户端)。 Flash:远程主机中需要部署一个crossdomain.xml文件,而且,Flash作为一门专有技术,其前途尚不明朗;换句话说...
-
今天在aw那里看到他的博客用了Firefox专有的圆角属性,另外WordPress的后台也使用了,于是我自己也就试一下来用了。目前IE还未支持圆角属性,IE8我还不清楚支不支持,或许我们以后只要使用border-radius这个CSS3属性就能轻松地在现代浏览器实现这个困扰很多小盆友的问题了,希望这一天的到来不会太遥远。目前我们已经可以在Firefox,Chrome,Safari实现这个功能了,但他们也还是使用私有属性来实现,用法上略有区别。先说一下Firefox的圆角属性:-moz-borde...
-
CSS禁止文字自动换行 2013-11
当中文文字很长的时候(中间没有空格也没有换行符号),不管是IE还是firefox,到达边界都会自动换行。 但是有的情况,我们并不希望这样。比如:当在几个li并排排列,不想让每行的最后的一个li的文字自动换行,那就可以使用"white-space:nowrap"这个属性了。使用这个CSS属性之后,文本只有在遇到空格或者是换行符的时候才能换行,比如:<style type="text/css">div{width:300px;border:1px ...
-
HTML 5 参考手册 2013-11
通过制定如何处理所有 HTML 元素以及如何从错误中恢复的精确规则,HTML 5 改进了互操作性,并减少了开发成本。HTML 5 中的新特性包括了嵌入音频、视频和图形的功能,客户端数据存储,以及交互式文档。HTML 5 还包含了新的元素,比如:<nav>, <header>, <footer> 以及 <figure> 等等。HTML 5 工作组包括:AOL, Apple, Google, IBM, Microsoft, Mozilla, Nokia...
-
解决ajax获取页面直接显示乱码的方法 2012-12
大家都知道,xmlhttp在通信时采用的是utf编码,而国内很多网页的信息都是采用gbk编码,所以当直接通过ajax去连接网页,并将获取到的信息直接显示的话就会出现乱码的现象,有些时候无法改变服务器端网页的编码(例如获取别的网站的天气预报信息),在这种时候就只能在客户端通过js做编码的工作了,下面这段js就是用于将服务器端返回的gbk编码字符串转换为utf编码字符串: function gb2utf8(data){ var glbEncode = []; gb2utf8_data = d...
-
百度编辑器 UEditor 1.22版发布 2012-07
百度编辑器UEditor1.22新版发布!官网新增自定义工具栏界面功能!Version 1.2.21.编辑器不可编辑时,可以配置哪些功能可以使用,例如全屏2.table的边框为0时,采用虚线显示3.修复firefox下插入大量代码时,代码格式显示不正确的问题4.附件上传成功后显示初始文件名5.自定制下载优化6.当图片上传超时时,增加提示信息7.修复自动排版对H1不生效的问题8.修复插入超链接,超链接地址包含script标签,预览时会执行script语句的问题