我希望将程序的输出发送到 MEdit 框,但是无论出于何种原因,html 方法都没有设置框的值,我应该改用 MLabel 吗?
这是我的代码:
函数 MButton1Click(事件) {
var temp = $("#MEdit1").val();
temp = parseInt(temp);
var selectedItem = $("input[name='MRadioGroup1']:checked").val();
if(selectedItem == 0)
{
var five9ths = 5/9;
temp = temp - five9ths;
temp = temp + 32;
$('#MEdit3').html("C");
}
else
{
var nine5ths = 9/5;
temp = temp * nine5ths;
temp = temp + 32;
$('#MEdit3').html("F");
}
var temperature = temp.toString();
$('#MEdit2').html(temperature);
}