0

Bookmarklet: Show Options

Posted by admin on September 20, 2011 in Tool |

Habe heute wieder ein neues Bookmarklet (siehe auch Bookmarklets) geschrieben, das alle Werte von HTML-Options-Feldern in einer Textarea neben Options-Feld anzeigt.

Beispiel:

Ausprobieren kann man es, indem sie klicken.

Der Bookmarklet-Code:

for(u=0;document.forms.length;u++){ae=document.forms[u].elements;le=ae.length;for(i=0;i<le;i++){e=ae[i];if(e.type=='select-one'){l=0;ta=document.createElement('textarea');x=e.options.length;for(r=0;r<x;r++){if(r>0)ta.value+='\n';d=e.options[r].value+';'+e.options[r].text;ta.value+=d;l=d.length>l?d.length:l}ta.cols=''+l;ta.rows=''+e.options.length-1;e.parentNode.appendChild(ta)}}}

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2010-2024 Analysisfreaks.de All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.0.4, from BuyNowShop.com.

Developed by Hardik