开发者

Dynamically insert a frame inside a frameset as first frame in native javascript?

开发者 https://www.devze.com 2023-04-03 10:30 出处:网络
var m = document.getElementById(\'mainframeset\'); m.appendChild(newFrame); inserts a frame inside a frameset as last frame.
var m = document.getElementById('mainframeset');
m.appendChild(newFrame);

inserts a frame inside a frameset as last frame.

What I want here is to insert the frame as the first frame.

Something like this :

frameSet[0].insertBefore(newframe, frameSet[0].document.frames[0]);
开发者_开发问答

It doesn't work,though.

Thaks


frameSet[0].insertBefore(newframe, frameSet[0].firstChild);
0

精彩评论

暂无评论...
验证码 换一张
取 消