laravel形式选择动态变化值

时间:2017-09-20 12:13:42

标签: forms laravel select

我有一些选择表格:

SafariOptions safariOptions = new SafariOptions();  
safariOptions.setUseTechnologyPreview(true);
safariOptions.setUseCleanSession(true);

DesiredCapabilities capabilities = DesiredCapabilities.safari();
capabilities.setCapability(SafariOptions.CAPABILITY, safariOptions);
RemoteWebDriver driver = new RemoteWebDriver(
    new URL("http://172.31.4.70:4444/wd/hub"), capabilities); 

System.out.println(capabilities.toString());
System.out.println(safariOptions.toJson().toString());

driver.manage().window().maximize();
driver.get("https://check24.de/kredit");


//Close the browser
driver.quit();

当我选择cl_1值时,如何动态更改cl_2表单的值;

2 个答案:

答案 0 :(得分:0)

将此jquery代码添加到body标记的末尾:

<script>
    $(document).ready(
        $('#cl_1').change(function(
            $('#cl_2').val( $('#cl_1').val() ); //Or any code you need goes here
        ));
    );
</script>

答案 1 :(得分:0)

<script type="text/javascript">
    $(document).ready(function(){
       $("body").on("change","#cl_1",function(){
           $('#cl_2').val('1'); // You can put any value as your requirement
       });
    });
</script>