用于制作动态场 [英] for making a dynamic field

查看:61
本文介绍了用于制作动态场的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 民俗
我对js还是陌生的,请帮帮我.我正在创建一个通过js输入日期的字段.当我单击calander时,打开了calader并可以在其中放置日期.但是clander是连续的,就像它链接到一个表,当我输入日期时,它应该存储在表row.But中,但是对于第一行,当我在第二行中输入时,日期更改会反映在第一行日期字段中.还发送日期字段的代码.

<form name="bid_date" action="products.php?sub_p_id=<?php print $row_sub_product[''sub_p_id''];?>" method="post">
    <div>start date:<input type="text" name="start_date" value="<?php print $row_bid_create[''start_date''];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        ''formname'': ''bid_date'',
        // input name
        ''controlname'': ''start_date''
    });
    </script>
    </div>
    <div>end date:<input type="text" name="end_date" value="<?php print $row_bid_create[''end_date''];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        ''formname'': ''bid_date'',
        // input name
        ''controlname'': ''end_date''
    });
    </script>




此处请参阅controlname'':``start_date'',这对于所有字段都是通用的,因此无法正常工作.因此如何使不同的字段与众不同.

解决方案

row_sub_product [''sub_p_id''];?>"method =" post> < div>开始日期:<输入type ="text" name ="start_date" value =<?php print


row_bid_create [''start_date''];?> ;"/> < script language ="JavaScript"> 新tcal({ //表单名称 ``formname'':``bid_date'', //输入名称 ``controlname'':``开始日期'' }); </script> </div> < div>结束日期:<输入type ="text" name ="end_date" value =<?php print


row_bid_create [''end_date''];?> ;"/> < script language ="JavaScript"> 新tcal({ //表单名称 ``formname'':``bid_date'', //输入名称 ``controlname'':``结束日期'' }); </script>




此处请参见controlname'':``start_date'',这对于所有字段都是通用的,因此无法正常工作,因此如何使不同的字段与众不同.


hi folk
i am new to js please help me out.i am creating a field to enter date through js.when i click on calander a calader is opened and i can put date there.but clander is in a row fashion like it is linked to a table and when i will enter date it should store in table row.but for first row it is happening but when i enter in second row then date change reflect on first row date field.give some suggesation or if possible code.for reference i am also sending code for date field.

<form name="bid_date" action="products.php?sub_p_id=<?php print $row_sub_product[''sub_p_id''];?>" method="post">
    <div>start date:<input type="text" name="start_date" value="<?php print $row_bid_create[''start_date''];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        ''formname'': ''bid_date'',
        // input name
        ''controlname'': ''start_date''
    });
    </script>
    </div>
    <div>end date:<input type="text" name="end_date" value="<?php print $row_bid_create[''end_date''];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        ''formname'': ''bid_date'',
        // input name
        ''controlname'': ''end_date''
    });
    </script>




here see controlname'': ''start_date'' this is common for all field so this is not working.so how to make it different for different field.

解决方案

row_sub_product[''sub_p_id''];?>" method="post"> <div>start date:<input type="text" name="start_date" value="<?php print


row_bid_create[''start_date''];?>"/> <script language="JavaScript"> new tcal ({ // form name ''formname'': ''bid_date'', // input name ''controlname'': ''start_date'' }); </script> </div> <div>end date:<input type="text" name="end_date" value="<?php print


row_bid_create[''end_date''];?>"/> <script language="JavaScript"> new tcal ({ // form name ''formname'': ''bid_date'', // input name ''controlname'': ''end_date'' }); </script>




here see controlname'': ''start_date'' this is common for all field so this is not working.so how to make it different for different field.


这篇关于用于制作动态场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆