lundi 1 juin 2015

How to update page asynchronously

Here is my code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://ift.tt/kTyqzh">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form>
<table>
    <tr>
        <td>
            <input type="text" name="input" size="20" class="FormText" readonly/>
        <td/>
    <tr/>
    <tr>
        <td>
            <input type="button" name="one" value="1">
        <td/>
    <tr/>
</table>
</form>
</body>
</html>

I want when button 1 is pressed to show 1 in the input field on the same page. I know this is achieved by Ajax but I cant make it. I read lot of articles but nothing helps.




Aucun commentaire:

Enregistrer un commentaire