diff --git a/LTEMvcApp/Views/Home/TestClientConfig.cshtml b/LTEMvcApp/Views/Home/TestClientConfig.cshtml index 337db5f..bb77ad4 100644 --- a/LTEMvcApp/Views/Home/TestClientConfig.cshtml +++ b/LTEMvcApp/Views/Home/TestClientConfig.cshtml @@ -406,8 +406,9 @@ }); // 监听模式切换 - $('input[name="mode"]').on('change', function() { + $(document).on('change', 'input[name="mode"]', function() { var selectedMode = $(this).val(); + console.log('模式切换:', selectedMode); $('.mode-layers').hide(); $('#' + selectedMode + 'Layers').show(); }); @@ -416,6 +417,7 @@ var initialMode = $('input[name="mode"]:checked').val(); $('.mode-layers').hide(); $('#' + initialMode + 'Layers').show(); + $('input[name="mode"]:checked').trigger('change'); // 监听地址输入框变化,自动查询配置 $('#address').on('blur', function() {