简体   繁体   English

将组合框的选定值显示为文本

[英]display the selected value of a combobox as text

Can I display the selected value of a combobox on the same page as text that updates as the selection changes? 我可以在与选择更改时更新的文本相同的页面上显示组合框的选定值吗? I'm trying to build a sentence using combo boxes and input fields. 我正在尝试使用组合框和输入字段构建一个句子。
The combobox represents a name for instance and needs to update in the sentence as it is changed. 组合框代表一个名称,例如,当它被改变时需要在句子中更新。
I would appreciate any help I can get 我将不胜感激任何帮助

Thanks 谢谢

PHP is a server-side language. PHP是一种服务器端语言。 You will need to use JavaScript to do this client-side if you do not wish to reload the page. 如果您不想重新加载页面,则需要使用JavaScript来执行此客户端。

Check out this SO Question for how to do this with JavaScript. 查看此SO问题 ,了解如何使用JavaScript执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM