JDocument::addScript: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
Adds a linked script to the page. | Adds a linked script to the page. | ||
<source lang="php"> | <source lang="php"> | ||
| Line 37: | Line 37: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Document|Document]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Document|Document]] | ||
* [[API17:JDocument::addScript|Other versions of JDocument::addScript]] | * [[API17:JDocument::addScript|Other versions of JDocument::addScript]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JDocument::addScript | category=JDocument::addScript | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 02:51, 25 March 2017
JDocument::addScript
Description
Adds a linked script to the page.
public function addScript (
$url
$type="text/javascript"
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $url | string | URL to the linked script | |
| $type | string | "text/javascript" | Type of script. Defaults to 'text/javascript' |
- Returns
- Defined on line 402 of libraries/joomla/document/document.php
See also
JDocument::addScript source code on BitBucket
Class JDocument
Subpackage Document- Other versions of JDocument::addScript
User contributed notes
Code Examples