HTML部分:
<input type="radio" name="optionsRadios" id="optionsRadios01" value="1" onclick="function1(this.value)">文本显示
script HTML点击显示:
function function1(value) {
if(value==1){
document.getElementById("output_data_1").value = 'xxx';
}
else{
document.getElementById("output_data_1").value = 'xxx';
}
}
script ajax点击传值:
function P1_Data_Playback() {
$.ajax({
type: "POST",
url: "/xxx/",
dataType: 'json',
async: true,
data: {
xxx:$('input:radio[name="optionsRadios"]:checked').val(),
},
});
}