PageSourceSearch

https://club4x4.ru/templates/club4x4/js/default_value.js

js club4x4.ru collected 2026-10-02 08:23:38 UTC 1,413 bytes, 55 lines download raw bytes

1function clearplaceholderValues(target_form)
2{
3    $('#'+target_form + ' input:text,' + '#'+target_form + ' textarea').each(function() {
4        var placeholder = $(this).attr('placeholder');
5        if(placeholder == $(this).val()){
6            $(this).val('');
7        }
8    });
9}
10
11function returnplaceholderValues(target_form)
12{
13    $(target_form + ' input:text,' + target_form + ' textarea').each(function() {
14        if($(this).val() == '') {
15            $(this).val($(this).val());
16        }
17    });
18}
19
20$(document).ready(function()
21{
22    $("form").submit(function(){
23        form_id = $(this).attr('id');
24        if(form_id.length == 0) {
25            
26        } else {
27            clearplaceholderValues($(this).attr('id'));
28        }
29    });
30    $("form input:text, form textarea").each(function (index) {
31		
32        if($(this).is('[placeholder]'))
33		
34        {
35            var val = $(this).val();
36            $(this).val($(this).attr('placeholder'));
37			
38            if (val.length > 0) {
39                $(this).val(val);
40            }
41        }
42    });
43
44    $("form input:text, form textarea").blur(function () {
45        if ($(this).val().length == 0) {
46            $(this).val($(this).attr('placeholder'));
47        }
48    });
49    
50    $("form input:text, form textarea").focus(function () {
51        if ($(this).val() == $(this).attr("placeholder")) {
52            $(this).val('');
53        }
54    });
55});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.