Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

javascript to retrieve webpage form elements


  • Please log in to reply
3 replies to this topic
guest_peacherwu
  • Guests
  • Last active:
  • Joined: --
Have seen the javascript many times that brings up the form elements one by one in alert windows.

This is a slight modification such that all the elements show up in current browser window (copy-paste friendly):
javascript:function ROIoiW(){var i=0,j,D,E,F=document.forms,DD="",m,M;while(i<F.length){E=F[i].elements;for(j=0;j<E.length;j++) {D=E[j];m=i+'/'+j+'/'+D.type+'-'+E.name+'-'+D.name+'-'+D.value+'\n';M=M+m;DD=DD+m+''} i++}document.write(DD);}ROIoiW();void(null)


garath
  • Members
  • 398 posts
  • Last active: Feb 05 2011 10:31 PM
  • Joined: 24 Mar 2005
Nice Java-snippet, but wrong forum.
Maybe, it would be a good idea, to collect all java-Snippets, which are capable to manipulate Web-pages, in one thread.

  • Guests
  • Last active:
  • Joined: --
Ops, intended to post in "scripts and functions" board. ;)

azure
  • Members
  • 1216 posts
  • Last active: Mar 18 2015 09:06 AM
  • Joined: 07 Jun 2007

Nice Java-snippet, but wrong forum.
Maybe, it would be a good idea, to collect all java-Snippets, which are capable to manipulate Web-pages, in one thread.


maybe in a subforum!

by the way, do you know any active javascript forum? (javascript as a object oriented language, to make scripts that customize our web browsing experience, not for web design)