您正在查看 "Javascript" 分类下的文章
2008年07月20日 星期日 下午 02:36
Crir.js
/*
CRIR - Checkbox & Radio Input Replacement
Author: Chris Erwin (me[at]chriserwin.com)
www.chriserwin.com/scripts/crir/
Updated July 27, 2006.
Jesse Gavin added the AddEvent function |
2008年07月12日 星期六 下午 07:28
Css Code:
label, input[type="text"]{
float:left;
display:block;
}
label
{
margin-right: 5px;
}
.field{
width:100%;
overflow:auto;
|
2008年05月07日 星期三 下午 03:27
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style type="text/css" media="screen">
<!--
BODY { margin: 10px; padding: 0;}
H1 { margin-bottom: 2px; }
|
2007年12月20日 星期四 上午 00:00
/*Javascript File*/
var starGo='', starNum=0;
function $(v) { return(document.getElementById(v)); }
function $S(v) { return(document.getElementById(v).style); }
function agent(v) { return(Math.max(navigator.userAgent.toLowerCase().indexOf(v),0)); }
function absPos(o) { var r={x:o.offsetLeft,y:o.offsetTop}; if(o.offs |
2007年12月02日 星期日 下午 10:30
·管理框架网页( frames )
1.创建一个框架架构网页
<html>
<frameset rows="50, *">
<frame name="header" src="header.html">
<frame name="main" src="main.html">
</frameset> |
2007年12月02日 星期日 下午 10:30
.字符串(String)
1.声明
var myString = new String("Every good boy does fine.");
var myString = "Every good boy does fine.";
2.字符串连接
var myString = "Every " + "good boy " + "does fine.";
var myString = "Every "; myString += "good boy does fine.";
|
2007年11月22日 星期四 上午 10:01
You either love Javascript or you hate it. Either way it can provide great functionality that users love. And it doesn’t have to affect usability. Here are my top 15 Javascript snippits for making great sites that bit extra special.
Image Loading & Fading
Crisp photography is a sure-fire way to make a site look great, but what about the loading times of those chunky images? Give |
2007年10月18日 星期四 下午 11:25
<!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" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript" >
<!--
function _gel(a)
{
return doc |
2007年10月15日 星期一 下午 03:14
/**
*=================================================================
*Name: 叶子js分页样式(ShowoPage Style With JS)
*RCSfile: Cls_jsPage.js
*Revision: 0.09
*Author: Yehe(叶子)
*Released: 2005-05-12 23:00:15
*Description: js分页样式,显示上一页下一页的翻页结果
*Contact: QQ:311673,MSN:myehe@msn.com
*WebSite: |
2007年10月14日 星期日 下午 11:42
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>test</TITLE>
<BODY>
<style>#fla img{BORDER:0px;}</style>
<DIV id=fla>
<SCRIPT language=javascript type=text/javascript>
var xsTextBar = 0; //是否显示文字链接,1为显示,0为不显示
var xsPlayBtn = 0; // |
2007年10月10日 星期三 上午 10:20
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="return false;" 防止复制
5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标
6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏 |
2007年09月18日 星期二 下午 02:46
1.execCommand()方法是执行一个命令对当前文档,当前选择或者给出的范围
document.execCommand(sCommand[,交互方式, 动态参数])
2.基本命令,如下
-------------------------------------------------------------------------------------------
2D-Position 允许通过拖曳移动绝对定位的对象。
AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。
BackColor 设置或获取当前选中区的背景颜色。
BlockDirLTR 目前尚未支持。
BlockDirRTL 目前尚未支持。
Bold 切换当前选中 |
2007年09月13日 星期四 下午 08:42
<HTML>
<HEAD>
<TITLE> Drag_126_like </TITLE>
</HEAD>
<BODY>
<style>
body,td,a {font-size:9pt;color:black}
.none{border:black 1px solid;background:D9D9D9;padding-top:2}
.over {border:black 1px solid;background:707888;color:white;padding-top:2}
</style>
<!--css:
加载css样式的方式:
head内引用 <style type = "text/css"></stylt>
|
2007年09月03日 星期一 上午 09:28
省事
0.js验证radio是否选择
<script language="javascript">
function checkform(obj)
{
for(i=0;i<obj.oo.length;i++)
if(obj.oo[i].checked==true) return true;
alert("请选择")
return false;
}
</script>
<form id="form1" name= |
2007年08月31日 星期五 下午 01:25
<html>
<head>
<script language="javascript" type="text/javascript">
<!--
var Class = {
create: function()
{
return function()
{
this.initialize.apply(this, arguments);
} |
|
|