Cost of Equity Calculation

Quick SEO Content Analyzer

Analysis Results:

function runSeoAnalysis() { var title = document.getElementById('seo_title').value; var desc = document.getElementById('seo_desc').value; var body = document.getElementById('seo_content').value; var output = document.getElementById('results_output'); var display = document.getElementById('seo_results'); var html = "; // Title Length (Recommended 50-60) var titleLen = title.length; var titleColor = (titleLen >= 30 && titleLen <= 60) ? 'green' : 'red'; html += '

Title Length: ' + titleLen + ' characters (Ideal: 30-60)

'; // Meta Description Length (Recommended 120-160) var descLen = desc.length; var descColor = (descLen >= 120 && descLen <= 160) ? 'green' : (descLen === 0 ? 'black' : 'orange'); html += '

Meta Description: ' + descLen + ' characters (Ideal: 120-160)

'; // Word Count (Recommended 300+) var words = body.trim().split(/\s+/).filter(function(word) { return word.length > 0; }).length; var wordColor = (words >= 300) ? 'green' : 'red'; html += '

Word Count: ' + words + ' words (Minimum recommended: 300)

'; // Keyword Density (Simple check for first word of title) if (titleLen > 0) { var firstWord = title.split(' ')[0].toLowerCase(); var count = 0; var bodyLower = body.toLowerCase(); var regex = new RegExp('\\b' + firstWord + '\\b', 'g'); var matches = bodyLower.match(regex); if (matches) count = matches.length; var density = (words > 0) ? ((count / words) * 100).toFixed(2) : 0; html += '

Density of "' + firstWord + '": ' + density + '% (' + count + ' occurrences)

'; } output.innerHTML = html; display.style.display = 'block'; }

Leave a Comment