Adsense calculator Coding!

Adsense calculator Coding!

Enter the number of page views, click-through rate, and cost per click to calculate earnings:







Earnings:

Daily: $

Monthly: $

Yearly: $

 
<div class="entry-content" itemprop="text">		

<section>

<section>

<script>

function calculateEarnings() {

    var pageViews = document.getElementById("pageViews").value;

    var clickThroughRate = document.getElementById("clickThroughRate").value;

    var costPerClick = document.getElementById("costPerClick").value;
    var dailyEarnings = (pageViews * clickThroughRate * costPerClick) / 100;

    var monthlyEarnings = dailyEarnings * 30;

    var yearlyEarnings = monthlyEarnings * 12; document.getElementById("dailyEarnings").innerText = dailyEarnings.toFixed(2);
    document.getElementById("monthlyEarnings").innerText = monthlyEarnings.toFixed(2);
    document.getElementById("yearlyEarnings").innerText = yearlyEarnings.toFixed(2);

    return false;

}
</script>

<p>Enter the number of page views, click-through rate, and cost per click to calculate earnings:</p>
<form onsubmit="return calculateEarnings()">

<label for="pageViews">Page Views:</label>

<input type="number" id="pageViews" required="">

<br />

<label for="clickThroughRate">Click-Through Rate (%):</label>

<input type="number" id="clickThroughRate" required="">

<br />

<label for="costPerClick">Cost Per Click ($):</label>

<input type="number" id="costPerClick" required="">

<br /><br />

<button type="submit">Calculate</button>

</form>

<br /><br />

<p>Earnings:</p>

<p>Daily: $<span id="dailyEarnings"></span></p>

<p>Monthly: $<span id="monthlyEarnings"></span></p>

<p>Yearly: $<span id="yearlyEarnings"></span></p>
		</div> 
Next Post
No Comment
Add Comment
comment url