javaScript--获取span的值
- html
<span id="operationType">录入</span>
- javascript
var V_operationType = document.getElementById("operationType"); console.log(V_operationType.innerText);
运行结果:
<span id="operationType">录入</span>
var V_operationType = document.getElementById("operationType"); console.log(V_operationType.innerText);
运行结果: