0

here is the code what i am trying

<script>
 var output = "<table id='e' border><tr><td><input type='text' id=/"t"/></td><td><input type='text' id=/"t1/"></td><td><input type='text1' id=/"t2"/></td><td><input type='text1' id=/"t3"/></td><button onclick=del('"+ divId +"')>delete</button></td></tr></table>";

</script>

<body>
<form method=post action="t.php">
<input type="text" id= ??(from script...)
</body>

what shell i do in order to send parameters from script to form one by one in text field? is there any possibilty?

ilay zeidman
  • 2,654
  • 5
  • 23
  • 45

2 Answers2

1

Yes, you can get value from input text:

<input type="text" id"yourIDinput" onchange="YouFunctionJavaScript()"/>

<script>
 function YouFunctionJavaScript(){
  var textInput = $("#yourIDinput").val(); // Here you get value
  alert(textInput); // 

}
</script>

It is?

CesarMiguel
  • 3,756
  • 4
  • 24
  • 34
1

In php:

<?php 
if($_POST['submit'])
{
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    //Here you have the text in php variables. You can do whatever you want with them
}
?>

<form method="post" enctype="multipart/form-data" name="form">
    Username: <input type="text" name="user" required>
    Password: <input type="password" name="pass" required>
</form>
pc_oc
  • 535
  • 3
  • 8
  • 26