JSFiddle - React, Tailwind, and code Playground

by Anton Kolesnikov

HTML

<div id="typo">
    <button id="btn">Кнопка</button>
    <div id="result"></div>
    ewewrterwtrewtewrtewrtwertert
</div>

CSS

#typo {
    position: fixed;
    display: inline;
    left: 0;
    right: 0;
    bottom: 0;
    
}

JavaScript

$(document).ready(
    $('#btn').click( function() {
        $.get('https://docs.google.com/forms/d/1SlLtGsqhHlFVuoI7OWx0b-uWDxcAvWC6kiDy3fa_XXM/formResponse?entry.269595129=' + window.getSelection().toString() + '&entry.915700124=321&entry.1949933921=' + window.location,
        function(data){
            if (data.success) {
                $('#result').html(data.success.msg);
            } else {
                $('#result').html(data.error.msg);
            }
        }, "json");
        alert('Спасибо. Ваш запрос принят')
    return false;
        
    } )
    
);

/* window.open('https://docs.google.com/forms/d/1SlLtGsqhHlFVuoI7OWx0b-uWDxcAvWC6kiDy3fa_XXM/formResponse?entry.269595129=123&entry.915700124=123&entry.1949933921=123'); */