您正在查看 "Javascript" 分类下的文章
2009-07-08 14:59
'abstract boolean break byte case catch char class const continue debugger ' +
'default delete do double else enum export extends false final finally float ' +
'for function goto if implements import in instanceof int interface long native ' +
'new null package private protected public return short static super switch ' +
'synchronized this throw th |
2009-07-06 16:14
<html>
<head>
<title>hidden verify</title>
</head>
<body>
<input id="verify" type="text" value="" onfocus="displayVerify()" onblur="hiddenVerify();" />
<br />
<br />
<div id="verifyBox" onclick="unHiddenVerify()" style="display:none;border:2px solid #ccc;width:200px;height:30px;padding:5px;"> 验证码的区域 |
2009-07-06 14:34
<script type="text/javascript">
function actsAsDecorator(object) {
object.setupDecoratorFor = function(method) {
if (! ('original_' + method in object) ) {
object['original_' + method] = object[method];
object['before_' + method] = [ ];
object['after |
2009-07-06 14:13
<script>
function Test(){
this.say1 = function(s){
alert(s);
}
this.say2 = function(s){
|
2009-07-06 11:21
2009-07-02 10:30
2009-06-30 18:18
TinyMCE 是一个基于浏览器(例如MSIE或Mozilla)的强大的所见即所得的编辑器,它使用户可以方便的编辑HTML内容。它非常灵活并且是为系统集成而设计的,比如在Intranets、CMS、LMS等系统中应用。
TriyMCE中文手册网站
TinyMCE官方网站
特点
|
2009-06-25 10:33
js input 鼠标点击清除提示内容,失去焦点还原默认内容的方法
=======================================
function clearDefaultText (el,message)
{
var obj = el;
if(typeof(el) == "string")
obj = document.getElementById(id);
if(obj.value == message)
{
obj.value = "";
}
obj.onblur = function()
{
if(obj.value == "")
{
obj.value = message;
}
}
}
================= |
2009-06-21 13:40
function onloadEvent(fn)
{
if (window.attachEvent)
{
window.attachEvent('onload',fn)//IE中
}
else
{
window.addEventListener('load',fn,false);//firefox
}
}
===================
function addEvent(el,EventType,callback)
{
var obj = el;
if(obj.addEventListener)
{
obj.addEventListener(EventType,callback,false);
}
else if(obj.attachEvent)
{
|
2009-06-18 18:22
https页面中使用iframe出现安全警告该问题的出现通常是iframe中的src属性缺失引起的,解决方法如下:
1.动态创建iframe,创建一个只含有<html></html>的空白htm页面,把iframe的src属性赋值为该空白页面。
var ifr = document.createElement("IFRAME");
ifr.scr="blank.html";
document.body.appendChild(ifr);
2.src属性设置为false或者void(0)如:src="javascript:void(0)" src="javascript:false" 在IE和Firefox下可以
3.给src赋空的 |
|
|