Search
 
SCRIPT & CODE EXAMPLE
 

HTML

execute python script onclick html

<!DOCTYPE html>
<html>
  <head>    
  </head>
  <body>
    <input type="button" id='script' name="scriptbutton" value=" Run Script " onclick="goPython()">

    <script src="http://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>

    <script>
        function goPython(){
            $.ajax({
              url: "MYSCRIPT.py",
             context: document.body
            }).done(function() {
             alert('finished python script');;
            });
        }
    </script>
  </body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: insert svg file in html with animation 
Html :: markdown table cell multiple lines 
Html :: td colspan all 
Html :: javascript moving text from left to right 
Html :: tailwind input 
Html :: how to include a dash in html 
Html :: What is the correct HTML element for playing audio files? 
Html :: what does :root do in html 
Html :: HTML Tag Checker Online 
Html :: clear input file html react 
Html :: how to put image in navbar 
Html :: ai writer 
Html :: iframe in html 
Html :: CKEditor in vanilla javascript 
Html :: row merging in html 
Html :: html video autosize 
Html :: image with url html 
Html :: align div in html 
Html :: trash icon html 
Html :: how to innerhtml is empty 
Html :: embed github html 
Html :: page break html 
Html :: how to insert input tag in html 
Html :: thymeleaf form delete method 
Html :: bootstrap modal causes page shift 
Html :: insertar playlist youtube html5 
Html :: invisible element html 
Html :: google icons 
Html :: mvc pass model to partial view 
Html :: text box border css 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =