Quindi ricapitolo.
Ho questo script che mi converte tutto il contenuto della textarea in minuscolo:
Codice PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>MINUSCOLO</title> <script type="text/javascript"> </script> <style type="text/css"> </style></head> <body> <form action="" method="post" name="modulo" id="modulo"> <p align="center">[b]MINUSCOLO[/b]</p> <table width="100%" border="1"> <tr> <td colspan="4"><textarea name="testuale" rows="32" id="testuale" style="width: 100%"></textarea></td> </tr> <tr> <td width="25%"><div align="center"> <input type='button' value='Minuscolo' onclick='CambiainMin()'> </div></td> <td width="25%"> </td> <td width="25%"> </td> <td width="25%"></td> </tr> </table> </p> </form> </body> </html>
Quello che vorrei ottenere è di limitare l'operazione di trasformazione in minuscolo, solo al testo che seleziono all'interno della textarea, e non a tutta la textarea.
Il problema è che non so come procedere oltre.