فارس التطوير

يقدم لكم فارس الاشهار خدمات متميزة
للاستفادة منها الرجاء التسجيل

انضم إلى المنتدى ، فالأمر سريع وسهل

فارس التطوير

يقدم لكم فارس الاشهار خدمات متميزة
للاستفادة منها الرجاء التسجيل

فارس التطوير

هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.
فارس التطوير

اقلامنا تتكلم وايادينا تعمل


    كود الة حاسبة في موقعك او منتداك

    EL mag!c
    EL mag!c
    مؤسس المنتدي
    مؤسس المنتدي


    ذكر
    عدد المساهمات : 165

    نقاُطًيَ : 458
    معًدُل شَكٌرُيً : 0
    تاريخ التسجيل : 06/06/2011

    كود الة حاسبة في موقعك او منتداك Empty كود الة حاسبة في موقعك او منتداك

    مُساهمة من طرف EL mag!c الثلاثاء يونيو 07, 2011 10:51 pm

    كود الة حاسبة في موقعك او منتداك 583563907
    كود الة حاسبة في موقعك او منتداك
    كود الة حاسبة في موقعك او منتداك 583563907

    الكود:

    <TITLE>--xx-- Source Code</TITLE>
    <--xx-- language="Live--xx--">
    <!-- hide this --xx-- tag's contents from old browsers
    function addChar(input, character)
    {
    if(input.value == null || input.value == "0")
    input.value = character
    else
    input.value += character
    }
    function deleteChar(input)
    {
    input.value = input.value.substring(0, input.value.length - 1)
    }
    function changeSign(input)
    {
    // could use input.value = 0 - input.value, but let's show off substring
    if(input.value.substring(0, 1) == "-")
    input.value = input.value.substring(1, input.value.length)
    else
    input.value = "-" + input.value
    }
    function compute(form)
    {
    form.display.value = eval(form.display.value)
    }
    function square(form)
    {
    form.display.value = eval(form.display.value) * eval(form.display.value)
    }
    function checkNum(str)
    {
    for (var i = 0; i < str.length; i++) {
    var ch = str.substring(i, i+1)
    if (ch < "0" || ch > "9") {
    if (ch != "/" && ch != "*" && ch != "+" && ch != "-"
    && ch != "(" && ch != ")" && ch != ".") {
    alert("invalid entry!")
    return false
    }
    }
    }
    return true
    }
    <!-- done hiding from old browsers -->
    </--xx-->
    </HEAD>
    <body bgcolor="White" text="Black" link="Blue" vlink="Blue" alink="Blue">
    <br>
    <form>
    <table border="5">
    <tr align="center">
    <td colspan = 4>
    <table border="3">
    <tr>
    <td align=center><input name="display" value="0" size=20></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr align=center>
    <td>
    <input type="button" value=" 7 "
    NOOP="addChar(this.form.display, '7')">
    </td>
    <td>
    <input type="button" value=" 8 "
    NOOP="addChar(this.form.display, '8')">
    </td>
    <td>
    <input type="button" value=" 9 "
    NOOP="addChar(this.form.display, '9')">
    </td>
    <td>
    <input type="button" value=" / "
    NOOP="addChar(this.form.display, '/')">
    </td>
    </tr>
    <tr align=center>
    <td>
    <input type="button" value=" 4 "
    NOOP="addChar(this.form.display, '4')">
    </td>
    <td>
    <input type="button" value=" 5 "
    NOOP="addChar(this.form.display, '5')">
    </td>
    <td>
    <input type="button" value=" 6 "
    NOOP="addChar(this.form.display, '6')">
    </td>
    <td>
    <input type="button" value=" * "
    NOOP="addChar(this.form.display, '*')">
    </td>
    </tr>
    <tr align=center>
    <td>
    <input type="button" value=" 1 "
    NOOP="addChar(this.form.display, '1')">
    </td>
    <td>
    <input type="button" value=" 2 "
    NOOP="addChar(this.form.display, '2')">
    </td>
    <td>
    <input type="button" value=" 3 "
    NOOP="addChar(this.form.display, '3')">
    </td>
    <td>
    <input type="button" value=" - "
    NOOP="addChar(this.form.display, '-')">
    </td>
    </tr>
    <tr align=center>
    <td>
    <input type="button" value=" 0 "
    NOOP="addChar(this.form.display, '0')">
    </td>
    <td>
    <input type="button" value=" . "
    NOOP="addChar(this.form.display, '.')">
    </td>
    <td>
    <input type="button" value=" +/- "
    NOOP="changeSign(this.form.display)">
    </td>
    <td>
    <input type="button" value=" + "
    NOOP="addChar(this.form.display, '+')">
    </td>
    </tr>
    <tr align=center>
    <td>
    <input type="button" value=" ( "
    NOOP="addChar(this.form.display, '(')">
    </td>
    <td>
    <input type="button" value=" ) "
    NOOP="addChar(this.form.display, ')')">
    </td>
    <td>
    <input type="button" value=" sq "
    NOOP="if (checkNum(this.form.display.value))
    { square(this.form) }">
    </td>
    <td>
    <input type="button" value=" <- "
    NOOP="deleteChar(this.form.display)">
    </td>
    </tr>
    <tr align=center>
    <td colspan="2">
    <input type="button" value=" Enter " name="enter"
    NOOP="if (checkNum(this.form.display.value))
    { compute(this.form) }">
    </td>
    <td colspan="2">
    <input type="button" value=" C "
    NOOP="this.form.display.value = 0 ">
    </td>
    </tr>
    </table>
    </form>
    </BODY>

      الوقت/التاريخ الآن هو الجمعة مايو 17, 2024 10:18 am