为你的品牌找到完美的名字。
javascript const form = document.getElementById('form'); const results = document.getElementById('results');form.addEventListener('submit', (event) => {event.preventDefault();const name = document.getElementById('name').value;const industry = document.getElementById('industry').value;const keywords = document.getElementById('keywords').value;let suggestions = [];// 根据品牌名称生成建议if (name) {suggestions = suggestions.concat(name.split(' ').map(word => word.toLowerCase()));}// 根据行业生成建议if (industry) {suggestions = suggestions.concat(industry.split(' ').map(word => word.toLowerCase()));}// 根据关键词生成建议if (keywords) {suggestions = suggestions.concat(keywords.split(',').map(word => word.toLowerCase()));}// 去除重复的建议suggestions = [...new Set(suggestions)];// 根据长度和相关性对建议进行排序suggestions.sort((a, b) => {const aLength = a.length;const bLength = b.length;if (aLength === bLength) {return 0;} else if (aLength < bLength) {return -1;} else {return 1;}});// 显示结果results.innerHTML = '';for (let suggestion of suggestions) {const li = document.createElement('li');li.textContent = suggestion;results.appendChild(li);} }); 标签: logo起名神器、 logo起名、 生成器、本文地址: https://w6.hk/hlwzxwz/1159.html
上一篇:品牌logo上的r是什么意思品牌logo...