本文介绍了单选按钮和文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要为计算标记的系统做。起初,我创建了用于插入标记的单选按钮和文本框,但它似乎不那么用户友好。 所以我决定将它们改为自动计算标记,这意味着当用户选择单选按钮时,系统会自动计算并显示文本框中的标记。 例如,问题1的最大标记为5,评级= 1,2,3,4,5(单选按钮),用户选择1,因此文本框将显示值1但是,例如,当问题1的最大标记为10且评级= 1,2,3,4,5(单选按钮)并且用户选择3时,我相信大多数人将编码系统来计算和在文本框中显示值为6.但在手动中标记可以是5或6.因此,有没有适当的方法来做到这一点?或者更适合解决这个问题的任何建议或评论都是值得赞赏的。在此先感谢。 从数据库中检索最大标记和大部分数据并使用循环显示。 如果我想要用户选择单选按钮并直接计算值并在textxbox中显示,然后如何?此外,如何在数据库中保存单选按钮和文本框(自动计算的值)的值?I need to do for a system that calculate the marks. At first, I had created the radio buttons and textboxes for user to insert the marks, but it seems not so user friendly.So I decide to change them into automatically calculate the marks which means that when the user select the radio button, the system will automatically calculate and display the marks in the textbox.For example, maximum marks for question 1 is 5 and rating=1,2,3,4,5 (radio button) and user select 1, therefore the textbox will display value 1. But, for example, when the maximum marks for question 1 is 10 and rating=1,2,3,4,5 (radio button) and user select 3, I believe that most of the people will code the system to calculate and display at textbox witht the value 6. But in manual the marks can be 5 or 6. Therefore, is there any appropriate ways to do this?or any kinds of suggestion or comments which is more suitable to solve this problem are appreciated. Thanks in advance.The maximum marks and most of the data are retrieved from database and display using looping.If I want the user select the radio button and directly calculate for the value and display in textxbox, then how?Furthermore, How can I save the value of radio button and textbox (the value which calculate automatically) in the database?推荐答案 这篇关于单选按钮和文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-22 22:59
查看更多