Function Reference/addLoadEvent

来自WordPress中文文档
跳转至: 导航搜索

div style=padding: 1em 0; margin: 1em 0; background-color: #ffe4e1; border: 1px solid darkslateblue; text-align: center;REQUEST FOR DELETION mdash; This page has been requested to be deleted from Codex./div

Description

For theme and plugin development: in order to have a Javascript function executed in the admin areas on load, or when the document is ready, use the following:

addLoadEvent('my_onload_function');


function my_onload_function(){
	alert('Look, the document has loaded.');
}


Usage

Parameters

includeonlydiv style=clear:both; background-color:#FAEBD7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;This page is marked as incomplete. You can help Codex by expanding it./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 检查到模板循环:模板:Message /pre

Result

检查到模板循环:模板:Message

/noinclude