Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

javascript - 如何使用jQuery替换div的innerHTML?(How to replace innerHTML of a div using jQuery?)

How could I achieve the following:

(我怎样才能实现以下目标:)

document.all.regTitle.innerHTML = 'Hello World';

Using jQuery where regTitle is my div ID?

(使用jQuery,其中regTitle是我的div ID?)

  ask by tonyf translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
$("#regTitle").html("Hello World");

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...