用PHP的Javascript表单发布

JS CODE:

    function yetiskintext() {

    document.getElementById("yetiskindiv").innerHTML="";
    var secenek=document.getElementById("yetiskinid").value;

    while (secenek>0){
    var newlabel = document.createElement("Label");
    newlabel.setAttribute("for","keke");
    newlabel.innerHTML = "Adı :";
    newlabel.className='selectTravelInputFieldsCarText';
    document.getElementById("yetiskindiv").appendChild(newlabel);   

    var textBoxname = document.createElement('input');
    textBoxname.name = 'textyetiskinname'+secenek;
    textBoxname.id='textyetiskinname'+secenek;
    textBoxname.type = 'text';
    textBoxname.className='selectTravelInputFieldsCar';
    document.getElementById("yetiskindiv").appendChild(textBoxname);

    var newlabel = document.createElement("Label");
    newlabel.setAttribute("for","keke");
    newlabel.innerHTML = "</br>";
    document.getElementById("yetiskindiv").appendChild(newlabel);

MAIN PHP PAGE:

<div id="yetiskindiv"></div>

FORM START:

<form method="post" name="sigortayap"  action="sigorta-process.php" onsubmit="return dene()" >

SIGORTA_PROCESS.PHP:

<?php

    $yetiskinsayisi=htmlspecialchars($_POST["yetiskin"]);

    $cocuksayisi=htmlspecialchars($_POST["cocuk"]);
    $e=1;
     $a=htmlspecialchars($_POST["textyetiskinname".$e]);
    print $a; 

    echo $yetiskinsayisi;
    echo $cocuksayisi;


?>

I want to post my form. My form keeping js page i get form in <div>. How can I post this form ?

You should have a submit button in your form to submit it:

<input type="submit" value="Submit Form"/>

Here's what i've understood after looking at your code:

<form method="post" name="sigortayap"  action="sigorta-process.php" onsubmit="return dene()" >

when you say, onsubmit="return dene()" and dene() returns false then the form wont submit, so make sure that the function doesn't false.

If you want to do it via code:

<form id="yourform" method="post" name="sigortayap"  action="sigorta-process.php" onsubmit="return dene()" >

and in JS:

yourform.submit()