jquery populate text input from table based on select value

前端 未结 2 1362
时光取名叫无心
时光取名叫无心 2021-01-23 08:57

I have a form which contains a select named Client_ID as well as some other text inputs. What I need is that when a user selects a Client_ID, my fields Address1, Address 2 etc s

2条回答
  •  情书的邮戳
    2021-01-23 09:40

    Read this tutorial. I think it might help you understand the concept of moving data from client to the server and vise the versa.

    Keep in mind that in your case you need to combine event.

    $(document).ready(function(){  
        $("#my_select_box").change(function()   
        {   
           //send the data to the server as in the tutorial above  
        });   
    });   
    

提交回复
热议问题