通过从下拉列表中选择一个项目,将从数据库中自动填充另一个字段(文本字段)并锁定该字段 [英] By select an item from the dropdown list, the other field(text field) will be auto populate from the database and locked the field

查看:65
本文介绍了通过从下拉列表中选择一个项目,将从数据库中自动填充另一个字段(文本字段)并锁定该字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过从下拉列表中选择一个项目,其他字段(文本字段)将从数据库中自动填充并锁定字段

By select an item from the dropdown list, the other field(text field) will be auto populate from the database and locked the field

推荐答案

您需要编写一个服务器端下拉选择索引更改事件或者执行jQuery Ajax调用onchange of dropdown to service或者将从数据库中检索数据并返回的内容。



然后只需将返回数据分配到文本框中。我希望锁定意味着禁用文本框。您可以通过将其设置为只读来轻松完成。
You need to write a server side dropdown selection index changed event or do a jQuery Ajax call onchange of dropdown to service or something which will retrieve the data from database and return.

Then just assign the return data into the text box. I hope locking means disabling the text box. That you can easily do by making it read-only.


这篇关于通过从下拉列表中选择一个项目,将从数据库中自动填充另一个字段(文本字段)并锁定该字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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