jquery 下拉框值对应的id,赋到前面input中

        <tr>
                <td>
                    <p class="short-input ue-clear">
                        <label>安监员ID:</label>
                        <input type="text" >//*号标记
                    </p>
                </td>
           </tr>

jquery代码

 $("select[name=safername]").change(function(){
            $("input[name=saferid]").val($("select[name=safername]").val());
        })

后台php代码

<?php

public function getSafetyOfficerList()
    {
        $sql = "select * from sysusers where accounttype = '安监员' and isenable = 'Y'";
        $query = $this->db->query($sql);
        return $query->result_array();
    }

$data['saferofferlist'] =$this->getSafetyOfficerlist()

?>

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案