我试图更改以下代码的数据值的值:
<div class="media-body">
<small>Total MA'ers found</small>
<h2 id="totalma" class="media-heading animate-number" value="29" data-animation-duration="1500">0</h2>
</div>
Run Code Online (Sandbox Code Playgroud)
我试过了:
document.getElementById('totalma').data-value = 90;
Run Code Online (Sandbox Code Playgroud)
返回错误:ReferenceError:左侧无效赋值
我有一个搜索栏,由于某种原因,我键入时无法选择搜索建议,我曾尝试编辑列表和其他一些方法,但是它不起作用
以下是我的代码段。
var searchIndex = ["404 Error", "Address Bar", "Ajax", "Apache", "Autoresponder", "BitTorrent", "Blog", "Bookmark", "Bot", "Broadband", "Captcha", "Certificate", "Client", "Cloud", "Cloud Computing", "CMS", "Cookie", "CSS", "Cyberspace", "Denial of Service", "DHCP", "Dial-up", "DNS Record", "Domain Name", "Download", "E-mail", "Facebook", "FiOS", "Firewall", "FTP", "Gateway", "Google", "Google Drive", "Gopher", "Hashtag", "Hit", "Home Page", "HTML", "HTTP", "HTTPS", "Hyperlink", "Hypertext", "ICANN", "Inbox", "Internet", "InterNIC", "IP", "IP Address", "IPv4", "IPv6", "IRC", "iSCSI", "ISDN", "ISP", "JavaScript", "jQuery", "Meta Search Engine", "Meta Tag", "Minisite", "Mirror", "Name Server", …Run Code Online (Sandbox Code Playgroud)