שלח תשובה

זירת השאלות

21 תשובות

  1. אוריקס הגיב:

    המממ משהו כזה:


    <div id = "1" class = "a">Some Text</div>
    <script language="JavaScript">
    function fChangeCursor(){
        document.getElementById("1").style.cursor = "hand";
    }
    document.getElementById("1").attachEvent("onmouseover",fChangeCursor);
    </script>

  2. itay26 הגיב:

    יש למישהו מושג
    איך עושים את זה יחד עם asp.net

  3. ניר טייב הגיב:

    למה לערב בזה את JS ו-ASP.NET ?
    זה CSS בסיסי

    <asp:button style="cursor:pointer;"></asp:button>

    (מקווה שלא טעיתי ב-ASP.NET)

  4. itay26 הגיב:

    יש למישהו מושג
    איך אני יוצר label או כל control אחר שאני יכול בזמן ריצה לשנות את הגודל שלו.

    בתודה איתי.

  5. itay26 הגיב:

    בסדר יש לי עוד שאלה
    מישהו יכול להגיד לי איך אני יוצר פונקציה ב – javascript שמגדילה control ב – 10 פיקסלים בזמן לחיצה על כפתור במקלדת ?

    תודה על העזרה
    איתי.

  6. BuildHome הגיב:

    שרשר שאלותיך
    שאלות לא משורשרות יימחקו.

  7. ניר טייב הגיב:

    כך


    function upSize(id){
    var control = document.getElementById(""+id)
    var cWidth = parseInt(control.style.width)
    var cHeight = parseInt(control.style.height)
    control.style.width = (cWidth+10)+"px"
    control.style.height = (cHeight+10)+"px"
    }

    <asp:control onkeypress=upSize()></asp:control>

  8. itay26 הגיב:

    אני צריך לשים את ה…
    control ב – div מסוים ..?

    משום מה הוא לא מכיר את ה – id

    תודה.
    איתי.

  9. ניר טייב הגיב:

    תיקון


    <asp:control onkeypress="upSize("control")" id="control"></asp:control>

  10. itay26 הגיב:

    תודה עובד מצויין אם אפשר עוד שאלה..
    אם אני רוצה שזה יעבוד רק בלחיצה על החצים….

    תודה
    איתי.

  11. itay26 הגיב:

    תודה ניר זה עובד יש לי עוד שאלה…
    איך אני גורם שזה יתבצע רק במקרה שילחצו על החצים….

    תודה איתי.

  12. itay26 הגיב:

    שאלה קטנה
    יש לי את הקוד הבא :


    for(Index=0;Index < 5;Index++)
        {
            if(event.srcElement.id=="Label" + Index)//check if the image id is "moveMe"
            {
                mouseover=true; /*Notice this line, you will see why its there later on.*/
                leftpix=Label1.style.pixelLeft;
                toppix=(Label + Index).style.pixelTop;
                xcoor=event.clientX;
                ycoor=event.clientY;
                document.onmousemove=moveImage; //call the function moveImage
            }

    אם אני רוצה לדעת איזה label נלחץ ולפיו לעשות את הפונקציה…

    תודה.
    איתי

  13. itay26 הגיב:

    מישהו יכול להגיד לי בבקשה
    מה לא נכון בקוד הבא…?


    function setLocation(a)
    {
        for(Index=0;Index < 5;Index++)
        {
            var control = document.getElementById(""+id)
            //var control = event.srcElement.id
            if(event.srcElement.id=="Label" + Index)//check if the image id is "moveMe"
            {
                
                mouseover=true; /*Notice this line, you will see why its there later on.*/
                leftpix=control.style.pixelLeft;
                toppix=control.style.pixelTop;
                xcoor=event.clientX;
                ycoor=event.clientY;
                document.onmousemove=moveImage; //call the function moveImage
            }
        }

    משום מה הוא לא מבין את הערך שב – control הוא מגיע לפונקציה בזמן לחיצה על העכבר (onmousedown)

    בתודה איתי.

  14. BuildHome הגיב:

    שרשר שאלותיך
    אחרת הודעותיך יימחקו.

שלח תשובה