输入类型提交的跨浏览器问题

发布于 2024-11-17 16:58:25 字数 4752 浏览 0 评论 0原文

我制作的表单有问题,它在 Firefox 中可以工作,但在 IE 和 Chrome 中却不能!当我在 IEChrome 中按下“提交”按钮时,没有任何反应!我之前没有检查这个,因为我没想到我会遇到这样的问题!我不知道我在这里缺少什么!是否存在任何已知问题(错误),

表格:

    <div id="Formulari">
<div class="WraperForForm"> 
<form action="index.php?menu=rezervimet&submenu=rezervo" method="post">

<div class="elementsLabelBox">
        Emri:
</div>
<div class="elementsBox">
        <input type="text" id="emri" name="emri">
</div>

<div class="elementsLabelBox">
        Mbiemri:
</div>
<div class="elementsBox">
        <input type="text" id="mbiemri" name="mbiemri">
</div>

<div class="elementsLabelBox">
        Prej:
    </div>
<div class="elementsBox">
        <select class="selectDest" name="Prej" onChange="getState(this.value)">
            <option></option>
            '.funksionet::all_directions().'
        </select>
</div>

<div class="elementsLabelBox">
        Deri:
</div>
<div class="elementsBox">
        <div id="statediv"><select class="selectDest" name="deri">
            <option></option>
        </select></div>
</div>
<div class="elementsLabelBox">

            <form name="Data1Drejtim">
            <label for="data1drejtim">Data e nisjes:</label>
</div>
<div class="elementsBox">
            <input type="text" id="data1drejtim" name="data1drejtim">
            <script language="JavaScript">


    // whole calendar template can be redefined per individual calendar
    var A_CALTPL = {
        \'months\' : [\'Janar\', \'Shkurt\', \'Mars\', \'Prill\', \'Maj\', \'Qershor\', \'Korrik\', \'Gusht\', \'Shtator\', \'Tetor\', \'Nentor\', \'Dhjetor\'],
        \'weekdays\' : [\'Di\', \'He\', \'Ma\', \'Me\', \'Ej\', \'Pr\', \'Sh\'],
        \'yearscroll\': true,
        \'weekstart\': 0,
        \'centyear\'  : 70,
        \'imgpath\' : \'images/\'
    }

    new tcal ({
        // if referenced by ID then form name is not required
        \'controlname\': \'data1drejtim\'
    }, A_CALTPL);
    </script>

</div>
<!-- ___________________ RETURN DATE _____________________________________ -->
<div id="hideThis">
<div class="elementsLabelBox">
        <label for="dataKthyese">Data kthyese:</label>
</div>  

<div class="elementsBox">           
            <input type="text" id="dataKthyese" name="dataKthyese">
                <script language="JavaScript">


    // whole calendar template can be redefined per individual calendar
    var A_CALTPL = {
        \'months\' : [\'Janar\', \'Shkurt\', \'Mars\', \'Prill\', \'Maj\', \'Qershor\', \'Korrik\', \'Gusht\', \'Shtator\', \'Tetor\', \'Nentor\', \'Dhjetor\'],
        \'weekdays\' : [\'Di\', \'He\', \'Ma\', \'Me\', \'Ej\', \'Pr\', \'Sh\'],
        \'yearscroll\': true,
        \'weekstart\': 0,
        \'centyear\'  : 70,
        \'imgpath\' : \'images/\'
    }

    new tcal ({
        // if referenced by ID then form name is not required
        \'controlname\': \'dataKthyese\'
    }, A_CALTPL);
    </script>
            </form>
</div>
</div>  




<div class="elementsLabelBox">
    Persona:
</div>
<div class="elementsBox">
        <select name="persona">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
        </select>
</div>
<!-- <tr>
    <td width="30" >Fëmij:</td>
    <td><input type="text" size="3" name="femij"></td>
</tr> -->

<div class="elementsBox">
</div>
<div class="elementsLabelBox">
</div>

<div class="elementsLabelBox">
        <label for="1drejtim">Një drejtim</label>
        <input type="radio" id="1drejtim" name="drejtimi"  value="një drejtim" onclick="toggleVisibility(\'hideThis\',0)">
<br/>
        <label for="1drejtim">Kthyese</label>
        <input type="radio" id="kthyese" name="drejtimi" checked="checked" value="kthyese"  onclick="toggleVisibility(\'hideThis\',1)">
</div>


    <input style="float:right;margin:15px 49px 0 0;" type="submit" value="Rezervo" name="rezervo" />


</form><!-- end of the reservation form-->
</div>
</div><!-- end of Formulari-->

谢谢您的宝贵时间。

I have a problem with a form that I made, it is working in Firefox but in IE and Chrome it doesnt! when I press the Submit button in IE and Chrome nothing happens! I didnt check this before because I didnt thought that I will have problems like this! I dont know what I am missing here! is there any known problem (bug)

the form:

    <div id="Formulari">
<div class="WraperForForm"> 
<form action="index.php?menu=rezervimet&submenu=rezervo" method="post">

<div class="elementsLabelBox">
        Emri:
</div>
<div class="elementsBox">
        <input type="text" id="emri" name="emri">
</div>

<div class="elementsLabelBox">
        Mbiemri:
</div>
<div class="elementsBox">
        <input type="text" id="mbiemri" name="mbiemri">
</div>

<div class="elementsLabelBox">
        Prej:
    </div>
<div class="elementsBox">
        <select class="selectDest" name="Prej" onChange="getState(this.value)">
            <option></option>
            '.funksionet::all_directions().'
        </select>
</div>

<div class="elementsLabelBox">
        Deri:
</div>
<div class="elementsBox">
        <div id="statediv"><select class="selectDest" name="deri">
            <option></option>
        </select></div>
</div>
<div class="elementsLabelBox">

            <form name="Data1Drejtim">
            <label for="data1drejtim">Data e nisjes:</label>
</div>
<div class="elementsBox">
            <input type="text" id="data1drejtim" name="data1drejtim">
            <script language="JavaScript">


    // whole calendar template can be redefined per individual calendar
    var A_CALTPL = {
        \'months\' : [\'Janar\', \'Shkurt\', \'Mars\', \'Prill\', \'Maj\', \'Qershor\', \'Korrik\', \'Gusht\', \'Shtator\', \'Tetor\', \'Nentor\', \'Dhjetor\'],
        \'weekdays\' : [\'Di\', \'He\', \'Ma\', \'Me\', \'Ej\', \'Pr\', \'Sh\'],
        \'yearscroll\': true,
        \'weekstart\': 0,
        \'centyear\'  : 70,
        \'imgpath\' : \'images/\'
    }

    new tcal ({
        // if referenced by ID then form name is not required
        \'controlname\': \'data1drejtim\'
    }, A_CALTPL);
    </script>

</div>
<!-- ___________________ RETURN DATE _____________________________________ -->
<div id="hideThis">
<div class="elementsLabelBox">
        <label for="dataKthyese">Data kthyese:</label>
</div>  

<div class="elementsBox">           
            <input type="text" id="dataKthyese" name="dataKthyese">
                <script language="JavaScript">


    // whole calendar template can be redefined per individual calendar
    var A_CALTPL = {
        \'months\' : [\'Janar\', \'Shkurt\', \'Mars\', \'Prill\', \'Maj\', \'Qershor\', \'Korrik\', \'Gusht\', \'Shtator\', \'Tetor\', \'Nentor\', \'Dhjetor\'],
        \'weekdays\' : [\'Di\', \'He\', \'Ma\', \'Me\', \'Ej\', \'Pr\', \'Sh\'],
        \'yearscroll\': true,
        \'weekstart\': 0,
        \'centyear\'  : 70,
        \'imgpath\' : \'images/\'
    }

    new tcal ({
        // if referenced by ID then form name is not required
        \'controlname\': \'dataKthyese\'
    }, A_CALTPL);
    </script>
            </form>
</div>
</div>  




<div class="elementsLabelBox">
    Persona:
</div>
<div class="elementsBox">
        <select name="persona">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
        </select>
</div>
<!-- <tr>
    <td width="30" >Fëmij:</td>
    <td><input type="text" size="3" name="femij"></td>
</tr> -->

<div class="elementsBox">
</div>
<div class="elementsLabelBox">
</div>

<div class="elementsLabelBox">
        <label for="1drejtim">Një drejtim</label>
        <input type="radio" id="1drejtim" name="drejtimi"  value="një drejtim" onclick="toggleVisibility(\'hideThis\',0)">
<br/>
        <label for="1drejtim">Kthyese</label>
        <input type="radio" id="kthyese" name="drejtimi" checked="checked" value="kthyese"  onclick="toggleVisibility(\'hideThis\',1)">
</div>


    <input style="float:right;margin:15px 49px 0 0;" type="submit" value="Rezervo" name="rezervo" />


</form><!-- end of the reservation form-->
</div>
</div><!-- end of Formulari-->

Thank you for your time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七月上 2024-11-24 16:58:25

此文档中有两个

标记,最接近提交按钮的嵌套标记没有任何操作或方法属性。 IE 和 Chrome 不执行任何操作是正确的,因为此表单没有与提交关联的操作。

You have two <form> tags in this document, and the one nested closest to the submit button has no action or method attributes. IE and Chrome are correct to do nothing since this form has no action to associate with submission.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文