博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
一些js常用函数
阅读量:6875 次
发布时间:2019-06-26

本文共 415 字,大约阅读时间需要 1 分钟。

add函数

function addLoadEvent(func){

var load=window.onload;
if(typeof window.onload!='function')
{
window.func=onload;
}
else
{
load();
func();
}
}

insertAfter函数

function insertAfter(newElement,tagElemnt){

parent=tagElemnt.parentNode;
if(tagElemnt==parent.lastChild)
{
parent.appendChild(newElement);
}
else
{
insertBefore(newElement,tagElemnt.nextSibling);
}
}

转载于:https://www.cnblogs.com/zhouboke111/p/9068376.html

你可能感兴趣的文章
configure mount nfs
查看>>
Centos6.4 cobbler安装要点
查看>>
尝试用不同语言写简单题的过程中的一些小发现
查看>>
CentOS6.9切换root用户su root输入正确密码后一直提示Incorrect password,如何解决?...
查看>>
Windows环境下MySQL主从配置
查看>>
notepad++ 调整行间距
查看>>
Java的Socket通信简单实例
查看>>
tomcat中server.xml配置详解
查看>>
WebSite
查看>>
低端手机刷机--[2.3 固件ROM] GT-i5508、5500刷安卓2.3.7 包含(教程 刷机包 等)
查看>>
解决IllegalStateException: Can not perform this action after onSaveInstanceState
查看>>
linux 命令
查看>>
事件 ( 13 章 )
查看>>
oracle好书(11章 配置网络)
查看>>
[ Luogu Contest 10364 ] TG
查看>>
YOLO Object Detection with OpenCV
查看>>
python3 使用SimpleHTTPServer搭建web服务器
查看>>
[转载]计算机视觉领域研究资源及期刊、会议介绍
查看>>
REST介绍
查看>>
APUE读书笔记 之 文件I/O
查看>>