Twinays adlı üyeden alıntı: mesajı görüntüle
Yapamadım maalesef rica etsem daha detaylı yazabilir misiniz özelden?
Aşağıdaki kodu alırsanız çalışacaktır

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>Untitled</title>
    <script type="text/javascript">
        function yaz1()
        {
                    document.getElementById("snc").value=parseInt(document.getElementById("s1").value)+parseInt(document.getElementById("s2").value)
        }
        function yaz2()
        {
            document.getElementById("snc").value=parseInt(document.getElementById("s1").value)-parseInt(document.getElementById("s2").value)
        }
        function yaz3()
        {
                      document.getElementById("snc").value=parseInt(document.getElementById("s1").value)*parseInt(document.getElementById("s2").value)
        }
    </script>
</head>
<body>
<table border="0px" bgcolor="#ff0000" cellspacing="1px" width="300px" align="center">
    <tr bgcolor="#ffffff">
        <td width="125px">1. Sayı</td><td><input type="Text" name="s1" id="s1" value="10"></td>
    </tr>
    <tr bgcolor="#ffffff">
        <td>2. Sayı</td><td><input type="Text" name="s2" id="s2"  value="20"></td>
    </tr>
    <tr bgcolor="#ffffff">
        <td colspan="2" align="center">
            <input type="Button" value="+ (Topla)" onclick="yaz1()">
            <input type="Button" value="- (Çıkar)" onclick="yaz2()">
            <input type="Button" value="* (Çarp)" onclick="yaz3()">
        </td>
    </tr>
    <tr bgcolor="#ffffff">
        <td>Sonuç</td><td><input type="Text" name="snc" value="" id="snc"></td>
    </tr>
</table>
 
<form name="frm1" action="goster.html" method="post">
</form>
</body>
</html>