It is necessary to change the value using Javascript , because the search form is generated by itself and there is no access to the code.

Thanks a lot in advance.



    2 answers 2

    pure_js:

     document.getElementById('someInputId').value = 'changed Value'; 

    jQuery:

     $('#someInputId').val('changed Value'); 
    • Should it be triggered by some event, or just at the end of the page to push? - andrewshka
    • as you please ... you can: $ (document) .ready (function () {alert ($ ('# someInputId'). val ('changed Value'));}); - CrazyTimon
     $(document).ready(function(){ $("input").val("Значение"); }); Или <input onclick/onblur="this.value='Значения'"> 

    It depends on your situation. Do not forget to connect the library Jquery .

    • Yes, and document.getElementById ('someInputId'). Value = 'changed Value'; same as knes wrote below) - shanhaichik
    • I try to push at the end of the page - it does not work ... - andrewshka
    • Give me a link. - CrazyTimon