JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<input type="text" id="txt1"/> <!--onkeyup="searchFor(this.value);" -->
<button type="button" class="btn btn-primary" onClick="giveBack()">Test</button>
<div id="resultDiv"></div>
<button type="button" class="btn btn-info" onClick="giveTest()">Info Button</button>
<div id="content">Post here</div>
<input type="button" id="btnLoad" value="Load" />
<a href="http://.com/search.php?id=a10">search</a>
<button>Send an HTTP GET request to a page and get the result back</button>
<script>
$("button").click(function(){
resultDiv.innerHTML="buton funcion";
$.get("http://.com/search.php?id=a10")
document.getElementById("txt1").value="Test";
});
});
</script>
<script>
// $(document).ready(function(){
$("#btnLoad").click(function(){
$.ajax({
type: "GET",
url: "http://.com/search.php?id=a10",
success: function(data){
if(data != null) $("#content").text(data)
}
});
});
// });
function giveBack()
{
resultDiv.innerHTML="T";
document.getElementById("txt1").value="Test";
showUser();
}
function showUser() {
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("resultDiv").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","http://.com/search.php?id=a10",true);
xmlhttp.send();
}
}
function searchFor(suchbegriff){
var xmlHttp = null;
// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof XMLHttpRequest != 'undefined') {
xmlHttp = new...