分类: Js预览模式: 普通 | 列表
在内容模版</body>前加上下面代码
<script language=JavaScript>
function autoResizepic()
{
var picTarget=document.getElementById("text").getElementsByTagName("img");
if(picTarget){
for(var i=0;i<picTarget.length;i++)

查看更多...

Tags: 自动缩放

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 747
解决eWebEditor不支持IE8.IE7.傲游浏览器的方法如下:

1、首先找到eWebEditor编辑器所在的目录,然后搜索到editor.js文件,由于eWebEditor有很多个版本,所以editor.js文件所在的目录也有所不同,有的可能在Include目录下,有的可能在js目录下。

2、用记事本打开editor.js文件,找到如下代码:

if (element.YUSERONCLICK) {

查看更多...

Tags: ewebeditor

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 672
Dean Edwards 's Packer  是个非常有名的 Javascript 压缩/混淆工具,有 .NET / PERL / WSH / PHP 等几种版本, 而本文介绍的 就是Nicolas Martin 发布的 PHP 版。

使用说明:

所有声明,包括 function 函数定义,必须以分号结尾,示例代码:

Javascript: // sample code  var $input, $output;  // notice the semi-colon at the END of function declarations  onload = function() {     $input = document.getElementById("input");     $output = document.getElementById("output");     _clearAll(true); };  function _packScript() {     $output.value = pack($input.value); };  function _clearAll($focus) {     $output.value = $input.value = "";     // the "if" statement is NOT terminated with a semi-colon     if ($focus) {         $input.focus();     } };  

查看更多...

Tags: 压缩

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1279

jQuery技巧大放送

jQuery技巧大放送
1、关于页面元素的引用
通过jquery的$()引用元素包括通过id、class、元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用dom定义的方法。

2、jQuery对象与dom对象的转换
只有jquery对象才能使用jquery定义的方法。注意dom对象和jquery对象是有区别的,调用方法时要注意操作的是dom对象还是jquery对象。
普通的dom对象一般可以通过$()转换成jquery对象。

查看更多...

Tags: jQuery

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 557
<div align="center">
<script language="JavaScript">
<!--
function copyUrl(url){
var content='';
window.clipboardData.setData("Text",url);
alert("复制成功,请粘贴到你的QQ/MSN上推荐给你的好友,会员奖励相应积分");

查看更多...

Tags: 宣传 粘贴 好友

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 717

新闻滚动效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title> code.js.cn </title>
<style>
a{display:block;font-size:15px;line-height:18px;text-decoration:none;color:#333;font-family:Arial;font-size:12px;}

查看更多...

Tags: 滚动 效果

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 588

超级实用且不花哨的js代码大全

事件源对象
event.srcElement.tagName
event.srcElement.type
捕获释放
event.srcElement.setCapture();  
event.srcElement.releaseCapture();  
事件按键

查看更多...

Tags: js 代码

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 681


<STYLE type=text/css>
A IMG {
FILTER: gray
}
A:hover IMG {FILTER:

查看更多...

Tags: 图片 灰色 彩色

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 707

网页中任意漂浮的广告代码

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>网页特效</title>
</head>
<body>
<DIV id=img1 style="Z-INDEX: 100; LEFT: 2px; WIDTH: 59px; POSITION: absolute; TOP: 43px; HEIGHT: 61px;

查看更多...

Tags: 漂浮

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 573
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>符合网页标准的随滚动条滚动的广告特效代码-建站学-jzxue.com</title>
</head>
<body>

查看更多...

Tags: 滚动

分类:Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 536