recent
أخبار ساخنة

إضافة الالة الحاسبة في مدونة بلوجر

إضافة الالة الحاسبة في مدونة بلوجر

Adding the calculator in Blogger blog

العديد من الناس التي ترغب في تصميم المدونات تحتاج الى خبرة في اكواد الجافا سكربت والاتش تي ميل من اجل تعديل الموقع ، ايضا لمن يقوم بتحميل القالب ويرغب في التعديل عليه تجدهم لا يفهمون في الاتش تي ميل والجافا سكريبت و لم يدرسها قط ولكن لهم ذكاء في تعديل القالب ، ولهذا مثل هؤلاء يجب علينا مساعدتهم في توفير مكتبة أكواد javascript / html مع الشرح من اجل ان يصل الى هدفه في تصميم القالب بطريقته الخاصة لتكون له بصمه في القالب .

هناك من المدونين من ترغب في اضافة سكربت الخاص بي الالة الحاسبة لمدونة بلوجر وتخصيص لها صفحة خاصة فقط بعملية حسابية لكل الزوار ، اذا كنت ممن يهمه في هذا الدرس الاول هذه الاضافة الكود شغال مع امثلة حية .

إضافة اله حاسبه لمدونات بلوجر بالفيديو :

 
شكل الالة الحاسبة
Adding the calculator in Blogger blog


كود سكربت الالة الحاسبة


<script>
function compute(obj) 
   {obj.expr.value = eval(obj.expr.value)}
var one = '1'
var two = '2'
var three = '3'
var four = '4'
var five = '5'
var six = '6'
var seven = '7'
var eight = '8'
var nine = '9'
var zero = '0'
var plus = '+'
var minus = '-'
var multiply = '*'
var divide = '/'
var decimal = '.'
function enter(obj, string) 
   {obj.expr.value += string}
function clear(obj) 
   {obj.expr.value = ''}
                      </SCRIPT>
       <font COLOR="#CC0000" face="Arial"><p>
<b>الألة الحاسبة 
                        الإلكترونية</B></P></FONT>
      <form name="calc">
                        <div align="center">
       <table border="1" bgcolor="#0033CC">
<tr>
                            <td colSpan="4"><input size=30 
                              name=expr action="compute(this.form)"></TD></TR>
<tr>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, seven)" type=button value="  7  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, eight)" type=button value="  8  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, nine)" type=button value="  9  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, divide)" type=button value="   /  "></P></TD></TR>
<tr>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, four)" type=button value="  4  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, five)" type=button value="  5  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, six)" type=button value="  6  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, multiply)" type=button value="  *  "></P></TD></TR>
<tr>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, one)" type=button value="  1  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, two)" type=button value="  2  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, three)" type=button value="  3  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, minus)" type=button value="   -  "></P></TD></TR>
<tr>
                            <td bgColor="#000033" colSpan=2>
                              <p>
<input onclick="enter(this.form, zero)" type=button value="       0       "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, decimal)" type=button value="   .  "></P></TD>
                            <td bgColor="#000033">
                              <p>
<input onclick="enter(this.form, plus)" type=button value="  +  "></P></TD></TR>
<tr>
                            <td bgColor="#000033" colSpan=2>
                              <p>
<input onclick=compute(this.form) type=button value="   =   "></P></TD>
                            <td bgColor="#000033" colSpan=2>
                              <p>
<input onclick=clear(this.form) type=reset value=AC>
         </P></TD></TR>
</TABLE></DIV></FORM>
         <p align="center">
<font face="Courier , New tahoma , erdana, arial, helveticav" size="2"
                              color="#0000FF"><b><a target="_blank" 


تنبيه قالب ليفون او المتشابه له لا يشتغل معه
google-playkhamsatmostaqltradent