We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
假设用户搜索上海,针对匹配信息项中上海字体高亮:
var arr = ['上海市公园', '上海自来水公司', '夜上海'] var value = '上海' var ul = document.getElementsByTagName('ul')[0] arr.forEach(item => { if(item.indexOf(value) !== -1) { let li = document.createElement('li') li.innerHTML = item.replace(value, `<span style="color: blue">${value}</span>`) ul.appendChild(li) } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
假设用户搜索上海,针对匹配信息项中上海字体高亮:
The text was updated successfully, but these errors were encountered: