Javascript jquery对话框-希望弹出窗口中的radiobutton输入值

Javascript jquery对话框-希望弹出窗口中的radiobutton输入值,javascript,jquery,html,jquery-ui,jquery-ui-dialog,Javascript,Jquery,Html,Jquery Ui,Jquery Ui Dialog,我想使用jquery对话框选择单选按钮,然后选择它,将.val添加到我的输入中,但为什么它不起作用?我的代码怎么了 我不确定我对单选按钮使用onchange事件是否正确 $function{ $MyDialog.dialog{ 自动打开:错误, 身高:600, 宽度:850, 莫代尔:是的, 按钮:{ 保存:函数{ $'.shirt_type'。在“更改”上,函数{ ifthis.value==1{ $'sh_type'.valHello; } ifthis.value==2 { $'sh_t

我想使用jquery对话框选择单选按钮,然后选择它,将.val添加到我的输入中,但为什么它不起作用?我的代码怎么了

我不确定我对单选按钮使用onchange事件是否正确

$function{ $MyDialog.dialog{ 自动打开:错误, 身高:600, 宽度:850, 莫代尔:是的, 按钮:{ 保存:函数{ $'.shirt_type'。在“更改”上,函数{ ifthis.value==1{ $'sh_type'.valHello; } ifthis.value==2 { $'sh_type'.valWorld; } ifthis.value==3 { $'sh_type'.valYes; } ifthis.value==4 { $'sh_type'.valWow; } }; $this。对话框关闭; }, 取消:功能{ $this。对话框关闭; } }, 关闭:功能{ $'.shirt_type'.val; } }; $choose_shirt.clickfunction{$MyDialog.dialog open;}; }; 1. 2. 3. 4. 弹出 正文: $function{ $MyDialog.dialog{ 自动打开:错误, 身高:600, 宽度:850, 莫代尔:是的, 按钮:{ 保存:函数{ var值=$”。衬衫类型:选中“.val; console.logvalue 如果值==1{ $'sh_type'.valHello; } 如果值==2{ $'sh_type'.valWorld; } 如果值==3{ $'sh_type'.valYes; } 如果值==4{ $'sh_type'.valWow; } $this.dialogclose; }, 取消:功能{ $this.dialogclose; } }, 关闭:功能{ } }; $choose\u shirt.clickfunction{ $MyDialog.dialogopen; }; }; 1. 2. 3. 4. 弹出 正文: