Search the Community
Showing results for tags 'textarea'.
-
Merhaba arkadaşlar. Aşağıdaki resimdeki gibi bir tasarımım var. Yapmak istediğim şey şu. Butonlara tıklayınca function.php'deki ilgili fonksiyonun çalışması ve echo içindeki değerin textarea içine yazılması. Mümkünse imlecin bulunduğu konuma yazılması. Bunu nasıl yapabiliriz? index.php <?php include("function.php"); ?> <!DOCTYPE html> <html lang="tr"> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="default.css"> <title>Form</title> </head> <body> <div id="Main"> <div id="FormButon"> <ul> <li><button type="submit">Form</button></li> <li><button type="submit">Div</button></li> <li><button type="submit">İnput</button></li> <li><button type="submit">Buton</button></li> </ul> </div> <div class="Clean"></div> <div id="FormOlustur"> <textarea rows="4" cols="50"></textarea> </div> </div> </body> </html> function.php <?php function FormElamani(){ echo '<form action="" method="post">Form</form>'; } function DivElamani(){ echo '<div class="">Div</div>'; } function InputElamani(){ echo '<input type="text" name="" class="">'; } function ButonElamani(){ echo '<button type="submit">Buton</button>'; } ?> default.css .Clean { clear: both; } #Main { width: 800px; margin: 40px auto; } #FormButon ul { margin: 0; padding: 0; list-style-type: none; } #FormButon ul li { float: left; margin-right: 5px; } #FormButon button { width: 100px; height: 30px; margin-bottom: 5px;} #FormOlustur textarea { width: 393px; height: 30px; margin-bottom: 5px; padding: 10px; height: 200px; resize:vertical;}