following are the mocha: line commands for netscape navigator [copy & paste in location: field]. maximum length of characters/location allowed by netscape is 256. to see the length after editing any code just click outside the typing area, or click button see length to view links of a document which is ...
...not in any frame: mocha:z=window.open('about:blank');z.document.open();for(p=0;p<document.links.length;p++)z.document.writeln(p+' <a href='+document.links[p]+' target="n">'+document.links[p]+'</a><br>');z.document.close();z.alert(p+' links'); length of code:
...in a frame but not in nested frames: [on prompt enter number of the frame (0 being the first frame)] mocha:z=window.open('about:blank');y=prompt('f#','1');z.document.open();t=window.frames[y].document;for(p=0;p<t.links.length;p++){z.document.writeln(p+' <a href='+t.links[p]+' target=n>'+t.links[p]+'</a><br>')};z.document.close;z.alert(p+' links'); length of code:
...in nested frames only upto 1 level: [on prompt first enter number of the parent frame, then number of the child frame (0 being the first frame)] mocha:z=open('about:blank');y=prompt('f#','0');x=prompt('f#','1');z.document.open();t=window.frames[y].frames[x].document;for(p=0;p<t.links.length;p++){z.document.writeln(p+' <a href='+t.links[p]+'>'+t.links[p]+'</a><br>')};z.document.close();z.alert(p) length of code: