Спасибо!
В первом коде выше 2 отличия от моего. Первое состоит в selectNodeContents вместо selectNode у меня, с утра я туплю - объясните мне разницу
selectNode() method sets the Range to contain the Node and its contents.
selectNodeContents() sets the Range to contain the contents of a Node
|