span的赋值与取值
| 1、span的文本的取值。 js取的值并不是用document.getElementById('span_noticesg').value,而是document.getElementById('span_id').innerText。 jquery取的值,是$("#span_noticesg").html(); 2、的赋值。 $('#span_id').html("span的文本"); document.getElementById('span_id').innerText="span的文本"; |