Wikipedia:User scripts/Guide: Difference between revisions

Content deleted Content added
Call from Monobook.js: importScriptURI
Finding elements: possessive ''its'' instead of contraction ''it's''
Line 48:
 
we can «find» element <tt>textarea</tt>:
* using it'sits <tt>id</tt>: <tt>document.'''getElementById'''('txtid')</tt>
* in the array of all elements with the same <tt>tag</tt>: <tt style="white-space:nowrap">document.'''getElementsByTagName'''('textarea')[0]</tt>
* using element next to it: <tt style="white-space:nowrap">document.getElementById('neighbor').'''previousSibling'''</tt>