Add exams from exam156 to exam199
This commit is contained in:
41
exam180/index.php
Normal file
41
exam180/index.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function insert(){
|
||||
if(window.XMLHttpRequest){
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
} else {
|
||||
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
|
||||
}
|
||||
|
||||
xmlhttp.onreadystatechange = function(){
|
||||
if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
|
||||
document.getElementById('message').innerHTML = xmlhttp.responseText;
|
||||
}
|
||||
}
|
||||
|
||||
parameters = 'text=' + document.getElementById('text').value;
|
||||
|
||||
|
||||
xmlhttp.open('POST', 'update.inc.php', true);
|
||||
xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); // slicno kao header() u php- u
|
||||
xmlhttp.send(parameters);
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Insert data: <input type="text" id="text">
|
||||
<input type="button" value="Submit" onclick="insert();">
|
||||
<div id="message"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user