属性innerText的问题(在线等,出价100) obj.innerText的使用方法是这样,另一个问题我先测一下看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <span Id="name1" >test </span><script language =javascript>var obj =document.getElementById("name1");alert(obj);obj.innerText="hello";</script>===================<script>运行的时候 <span>还没载入所以要换个顺序~ <span Id="name1" >test </span><script language =javascript>var obj =document.getElementById("name1");alert(obj);obj.innerText="hello";</script>//脚本写后面 另一个问题请将span放在script前面<span Id="name1" >test </span><script language =javascript>var obj =document.getElementById("name1");alert(obj);obj.innerText="hello";</script>这样 屏蔽查看源文件 页面之间调用jquery怎么办? jquery阻止onlick事件 正则问题 浮点数计算问题 easyui-datagrid 分页用不来 求帮助补代码 取得<select><option>yyyyyyyy</option></select>中的<option></option>中间的值的方法是什么? javascript能够获取网页中被选中文字的内容吗? 关于select 的小小问题 如何知道用户按了IE的停止按钮? 如何替換標簽里面的<br> 字号问题?
alert(obj);
obj.innerText="hello";</script>
===================
<script>运行的时候 <span>还没载入
所以要换个顺序~
<script language =javascript>var obj =document.getElementById("name1");
alert(obj);
obj.innerText="hello";</script>//脚本写后面
<span Id="name1" >test </span>
<script language =javascript>var obj =document.getElementById("name1");
alert(obj);
obj.innerText="hello";</script>
这样