Ma usare ajax per recuperare dati già presenti nel documento a che pro? Mi sembra tu cosca molto poco il javascript ti consiglio di leggerti le guide che trovi qui, tornando al tuo problema puoi benissimo fare cosi:
E' un esempio sulla base di quanto hai postatocodice:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Webpage</title> <meta http-equiv="content-Type" content="text/html; charset=utf-8"> <meta name="generator" content="WebDesign"> <script type="text/javascript"> function RecuperaDati(){ //alert('ciao'); var sel = document.getElementsByTagName("select"); var dati = document.getElementById('riepilogo'); dati.innerHTML = sel[0].options[sel[0].selectedIndex].value+' '+ sel[1].options[sel[1].selectedIndex].value dati.style.display='block'; } </script> </head> <body> <form action="" name="bgs"> <select size="8"> <option class="bg1">Default white</option> <option class="bg2">Red</option> <option class="bg3">Yellow</option> </select> <select size="8"> <option class="font1" style="font-family: Tahoma;">Tahoma</option> <option class="font2" style="font-family: 'Comic Sans MS';">Arial</option> <option class="font3" style="font-family: 'Times New Roman';">Times new roman</option> </select> <input type="button" name="submit" value="Invia" onclick="RecuperaDati();"/> </form> <div id="riepilogo" style="border: 1px solid red; z-index: 50; position: absolute; bottom: 0px; width: 100%; display:none;"></div> </body> </html>![]()

Rispondi quotando