0

I am using the below script to display my advertisement. I am using onclick to display my advertisement. I am try following code:

<a href="#" onclick="doalert(this); return false;" >Click here</a>

function doalert(obj) {
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- xxxxxxxxxxxx -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxxxxx"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
}

I want to check the page without click to advertisement are load.

Requirement- I am click the link for display advertisement. Otherwise no load advertisement.

Jaap
  • 81,064
  • 34
  • 182
  • 193
Tushar Korat
  • 591
  • 2
  • 7
  • 21
  • I think you need to learn JS, and how to insert basic HTML using JS. – evolutionxbox Sep 21 '16 at 09:55
  • This might be helpful: [Dynamic Adsense Insertion With JavaScript](http://stackoverflow.com/questions/6197768/dynamic-adsense-insertion-with-javascript) – showdev Sep 23 '16 at 22:39

0 Answers0