- 问题:
- 项目中所有使用jquery.submit()的方法在验证后提交在ie6中失去作用;
- 所有使用window.location.href=*** 方法在验证后在ie6中失去作用;
- 所有a链接中使用href=”javascript:void(0);”方法后在i6中点击失去使用;
- (失去作用意思为:点击后已经到后台取到值但页面并没有更新) (continue reading…)
ie6 下 jquery的 submit不起作用
浏览器对 ‘@font-face’ 规则支持的字体格式不同
标准参考
根据 CSS3 草案中的描述,’@font-face’ 规则允许使用链接到需要时自动激活的字体。这使得用户可以使用在线的字体,而不仅仅拘泥于使用用户端系统内的字体。一套对字体的描述定义了字体资源的位置,可以是本地也可以是其他地方,以及自定义个性化字体风格。
规则定义格式:
@font-face {
descriptor: value;
descriptor: value;
[...]
descriptor: value;
} (continue reading...)
Google Font API
http://code.google.com/intl/zh-CN/apis/webfonts/
The Google Font API helps you add web fonts to any web page.
Benefits of the Google Font API include:
- A choice of high quality open source fonts.
- Works in most browsers.
- Extremely easy to use.
For example, the following text uses a web font called Tangerine:
Applying a font is easy: just add a special stylesheet link to your web page, then use the font in a CSS style.
For details, see the quick start example.
js操作iframe的一些知识
1. 打印iframe
eg. frameName.document.execCommand(‘print’);
2. 获取iframe
eg. var ifr_window = window.frames[“frameName”];
3. 获取iframe中的元素
eg1. 将iframe中id为elementId 的元素置为不显示:
var ifr_window = window.frames[“frameName”];
ifr_window.elementId.style.display = ‘none’;
eg2. 获取iframe中id为listTable的表格
var oTable = window.frames[“myFrame”].document.all.listTable;
4. 隐藏或显示表格的某列
js函数:
function setHiddenOrShowCol(oTable, iCol, type) {
for (i = 0; i < oTable.rows.length ; i++) {
oTable.rows[i].cells[iCol].style.display = type;
}
}
调用举例,将id为listTable的表格元素的第4列置为不显示:
var oTable = window.frames[“myFrame”].document.all.listTable;
setHiddenOrShowCol(oTable, 3, ‘none’);
调用举例2,将id为listTable的表格元素的第4列置为显示:
var oTable = document.frames.myFrame.document.all.listTable;
setHiddenOrShowCol(oTable, 3, ‘block’);
iframe用法总结
<iframe>是框架的一种形式,也比较常用到。
例子1。
<iframe width=420 height=330 frameborder=0 scrolling=auto src=URL></iframe>
不用多说了。
width插入页的宽;height插入页的高;scrolling 是否显示页面滚动条(可选的参数为 auto、yes、no,如果省略这个参数,则默认为auto);frameborder 边框大小;
(continue reading…)
HTTP_HOST
In php code: $host = isset($_SERVER[‘HTTP_X_FORWARDED_HOST’]) ? $_SERVER[‘HTTP_X_FORWARDED_HOST’] : (isset($_SERVER[‘HTTP_HOST’]) ? $_SERVER[‘HTTP_HOST’] : ”);
In javascript code: “http://” + top.location.host + top.location.pathname
flexform配置reload显示不同配置项
主要用到displayCond这个标签:
<mode>
<TCEforms>
<label>LLL:EXT:cfa_mooflow/locallang_db.xml:cfa_mooflow.pi_flexform.mode</label>
<onChange>reload</onChange>
<config>
<type>select</type>
<items type=”array”>
<numIndex index=”0″ type=”array”>
<numIndex index=”0″>LLL:EXT:cfa_mooflow/locallang_db.xml:cfa_mooflow.pi_flexform.mode.0</numIndex>
<numIndex index=”1″>MANUAL</numIndex>
</numIndex>
<numIndex index=”1″ type=”array”>
<numIndex index=”0″>LLL:EXT:cfa_mooflow/locallang_db.xml:cfa_mooflow.pi_flexform.mode.1</numIndex>
<numIndex index=”1″>DIRECTORY</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</mode>
<defaultmode>
<TCEforms>
<displayCond>FIELD:mode:=:MANUAL</displayCond>
<label>LLL:EXT:cfa_mooflow/locallang_db.xml:cfa_mooflow.pi_flexform.images</label>
<config>
<type>group</type>
<internal_type>file</internal_type>
<allowed>jpg,gif,png</allowed>
<max_size>100000</max_size>
<uploadfolder>uploads/tx_cfamooflow/</uploadfolder>
<maxitems>100</maxitems>
<size>10</size>
<selectedListStyle>Width:280px</selectedListStyle>
</config>
</TCEforms>
</defaultmode> (continue reading…)
jQuery 获取对象
# 指示 id
. 指示 class
* 全选
, 多选
空格 后代
> 子
~ 兄弟
+ 下一个
: 子(多功能)
() 函数式的过滤与查找
(continue reading…)
Imagemagick CMYK
一般场景
图片缩放
这方面的属于入门级内容,使用ImageMagick必定会用到该方面的功能。主要涉及到 -resize 参数,下面该参数效果进行展示(尺寸参数的细节请参考这里):
- -resize 100×100: 将原图缩放为100×100,同时保持比例。(结果为:75X100)
- -resize 100×100^:缩放原图,直到宽或高等于指定的缩放尺寸。(结果为:100×133)
- -resize 100×100!:缩放原图并在必要时进行拉伸,以符合指定的缩放尺寸。(结果为 100×100,但图像变形了)
- -resize 100X100>:当原图宽或高大于指定尺寸时才进行缩放,同时保持原图比例(结果为:75×100)
- -resize 100X100<:当原图宽或高小于指定尺寸时才进行缩放,同时保持原图比例(结果为:150×200,因为不满足条件) (><参数可以搭配 ^! 使用) (continue reading…)
