易截截图软件、单文件、免安装、纯绿色、仅160KB

将html转换成PDF 转载

/*
Convert HTML to PDF with mozilla rendering engine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
Michele Baldessari <mich...
@pupazzo.org> 2006
Huang Ying <huang.ying.cari...
@gmail.com> 2008
*/
function WebProgressListener() {
var self = this;
}

WebProgressListener.prototype.
QueryInterface = function(iid) {
var self = this;
if (iid.equals(Components.interfaces.nsIWebProgressListener) ||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
iid.equals(Components.interfaces.nsISupports))
return self;
throw Components.results.NS_ERROR_NO_INTERFACE;
};

WebProgressListener.prototype.
onStateChange = function(webProgress, request, stateFlags, status) {
var self = this;
const WPL = Components.interfaces.nsIWebProgressListener;
if (stateFlags & WPL.STATE_STOP) {
if ("onDone" in self)
self.onDone();
if (stateFlags & WPL.STATE_IS_NETWORK)
if ("onNetworkDone" in self)
self.onNetworkDone();
}
};

WebProgressListener.prototype.
onProgressChange = function(webProgress, request, curSelf, maxSelf,
curTotal, maxTotal) { };
WebProgressListener.prototype.
onLocationChange = function(webProgress, request, location) { };
WebProgressListener.prototype.
onStatusChange = function(webProgress, request, status, message) { };
WebProgressListener.protot


相关文档:

解决json包含html标签无法显示的问题

主要是将json无法识别的字符进行转义   
function dotran($str) {
        $str = str_replace('"','\\"',$str);
        $str = str_replace("\r\n",'\\r\\n',$str);
        $str = str_ ......

HTML内部元素的Mouse事件干扰

解决HTML内部元素的Mouse事件干扰
解决HTML内部元素的Mouse事件干扰
话说有一个DIV元素,其内部有一个IMG元素和SPAN元素,不用理会这两个内部元素怎么布局,这不是我要讨论的重点。
为了实现一些特殊的效果,我需要利用TD的onmouseover和onmouseout事件,测试时就会发现如下的状况:
当鼠标移入DIV内部时,onmouseov ......

用CSS实现HTML元件的绝对定位


示例:此DIV为固定定位对象
要使HTML元件定位于浏览器的某个固定位置,而不随滚动条滚动,用以下CSS代码即可,跨各个主流浏览器: POSITION: fixed! important; TOP: 100px; _position: absolute; _top: 40; _left: 100。
示例见右边黄底红字块。 ......

HTML下拉菜单

一个简单的下拉菜单,主要说明CSS中posistion的作用。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号