<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=JavaScript_onclick</id>
		<title>JavaScript onclick - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=JavaScript_onclick"/>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=JavaScript_onclick&amp;action=history"/>
		<updated>2026-04-29T03:58:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://help.marketruler.com/index.php?title=JavaScript_onclick&amp;diff=1030&amp;oldid=prev</id>
		<title>Admin at 15:50, 26 February 2016</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=JavaScript_onclick&amp;diff=1030&amp;oldid=prev"/>
				<updated>2016-02-26T15:50:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:50, 26 February 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot; &gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add the '''onclick''' method:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add the '''onclick''' method:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;''url''&amp;quot; onclick=&amp;quot;return &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cr_link&lt;/del&gt;(this, '8')&amp;quot;&amp;amp;gt;Click here to sign up&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;''url''&amp;quot; onclick=&amp;quot;return &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;__CR.link&lt;/ins&gt;(this, '8')&amp;quot;&amp;amp;gt;Click here to sign up&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''onclick''' attribute should return a value which tells the browser whether to actually load the link or not. If the [[JavaScript]] function returns ''true'', then the link will be followed, if it returns ''false'', the link will not be followed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''onclick''' attribute should return a value which tells the browser whether to actually load the link or not. If the [[JavaScript]] function returns ''true'', then the link will be followed, if it returns ''false'', the link will not be followed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://help.marketruler.com/index.php?title=JavaScript_onclick&amp;diff=587&amp;oldid=prev</id>
		<title>Admin: Created page with 'In a web page's HTML, a web developer can use JavaScript to trigger client-side code to track when a link is clicked.  The '''&amp;lt;a&amp;gt;''' HTML tag appears like so:  …'</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=JavaScript_onclick&amp;diff=587&amp;oldid=prev"/>
				<updated>2010-11-04T13:33:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;In a web page&amp;#039;s &lt;a href=&quot;/wiki/HTML&quot; title=&quot;HTML&quot;&gt;HTML&lt;/a&gt;, a web developer can use &lt;a href=&quot;/wiki/JavaScript&quot; title=&quot;JavaScript&quot;&gt;JavaScript&lt;/a&gt; to trigger client-side code to track when a link is clicked.  The &amp;#039;&amp;#039;&amp;#039;&amp;lt;a&amp;gt;&amp;#039;&amp;#039;&amp;#039; &lt;a href=&quot;/wiki/HTML&quot; title=&quot;HTML&quot;&gt;HTML&lt;/a&gt; tag appears like so:  …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In a web page's [[HTML]], a web developer can use [[JavaScript]] to trigger client-side code to track when a link is clicked.&lt;br /&gt;
&lt;br /&gt;
The '''&amp;amp;lt;a&amp;amp;gt;''' [[HTML]] tag appears like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;''url''&amp;quot;&amp;amp;gt;Click here to sign up&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''onclick''' attribute can be added to the '''&amp;amp;lt;a&amp;amp;gt;''' tag, and the value contains the [[JavaScript]] to run when the user:&lt;br /&gt;
&lt;br /&gt;
* Selects the link using the keyboard and then hits the Enter key, or&lt;br /&gt;
* Clicks the link with their mouse, or&lt;br /&gt;
* Taps the link with their finger on a [[Touch-based Device]]&lt;br /&gt;
&lt;br /&gt;
To add the '''onclick''' method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;''url''&amp;quot; onclick=&amp;quot;return cr_link(this, '8')&amp;quot;&amp;amp;gt;Click here to sign up&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''onclick''' attribute should return a value which tells the browser whether to actually load the link or not. If the [[JavaScript]] function returns ''true'', then the link will be followed, if it returns ''false'', the link will not be followed.&lt;br /&gt;
&lt;br /&gt;
This allows a program to, for example, put up a warning before following a link.&lt;br /&gt;
&lt;br /&gt;
==For more information==&lt;br /&gt;
* [[Tracking Forms (JavaScript)]]&lt;br /&gt;
* [[Tracking Links (JavaScript)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>