Pereiti prie turinio

nba

Nariai
  • Pranešimai

    193
  • Užsiregistravo

  • Lankėsi

  • Atsiliepimai

    100%

nba Pranešimai

  1. Sveiki, nupirkciau masines pm, email ar dar kokias nors,siulykit ir facebook ir tinklapiu turetojai. rasykit kainas,registruotus o as atsirinksiu

     

    I pm pasiulymus net neziuriu, rasot cia, kad nebutu painiavos ir galeciau palyginti

  2. nu nu, tai kiek gi kilokalorijų čipsų pakelyje ir kiek sudega per pusantros valandos bėgimo? nes kažkaip nesueina man galai čia :)

     

     

    ten 50 min dirbu ir sudeginu 5tuks kilodzauliu (atrodo toks matas) nzn kiek zia butu kalorijom

  3. Apačioj labai aiškiai parašyta

    And you just add this to the field where you’d like to disable keys:
    
    <input type="text" name="mytext"
    onKeyPress="return disableCtrlKeyCombination(event);"
    onKeyDown="return disableCtrlKeyCombination(event);" />

     

    Šitas skriptas veikia ant to elemento, kuris savo tag'e turi onKeyPress ir onKeyDown parametrus. Jei nori ant viso puslapio uždrausti, pridėk juos prie body tag'o.

     

    Bet šiaip riboti user experience šitokiais būdais yra labai žema, tad labai greit atbaidysi visus normalius lankytojus. O jei bandai apsaugoti nuo kopijavimo, yra 101 būdas apeiti šitą dalyką, kad ir išjungiant JavaScript.

     

     

    gali patisklinti? Ka kur rasyti, jei noriu visame puslapyje uzdrausti?

  4. Yra toks scriptas kuris drauzdia spausti ctrl,bet as tuos abu kodus ikeliu iorman neveikia, gal ka ne taip darau? stai viskas su paaiskinimu:

    Few days ago Vijay asked if there’s a way to disable ctrl + n combination (open the new window shortcut. So I set out to create a small Java Script that disables any ctrl + key combination (e.g. ctrl + v, ctrl + c, ctrl + a, etc.).

     

    <script language="JavaScript">

    function disableCtrlKeyCombination(e)

    {

    //list all CTRL + key combinations you want to disable

    var forbiddenKeys = new Array(‘a’, ‘n’, ‘c’, ‘x’, ‘v’, ‘j’);

    var key;

    var isCtrl;

     

    if(window.event)

    {

    key = window.event.keyCode; //IE

    if(window.event.ctrlKey)

    isCtrl = true;

    else

    isCtrl = false;

    }

    else

    {

    key = e.which; //firefox

    if(e.ctrlKey)

    isCtrl = true;

    else

    isCtrl = false;

    }

     

    //if ctrl is pressed check if other key is in forbidenKeys array

    if(isCtrl)

    {

    for(i=0; i<forbiddenkeys .length; i++)

    {

    //case-insensitive comparation

    if(forbiddenKeys.toLowerCase() == String.fromCharCode(key).toLowerCase())

    {

    alert(‘Key combination CTRL + ‘

    +String.fromCharCode(key)

    +‘ has been disabled.’);

    return false;

    }

    }

    }

    return true;

    }

    </script>

     

    And you just add this to the field where you’d like to disable keys:

     

    <input type="text" name="mytext"

    onKeyPress="return disableCtrlKeyCombination(event);"

    onKeyDown="return disableCtrlKeyCombination(event);" />

     

     

    Although the key combinations are disabled only on one field the same script can be easily modified to disable ctrl + key combinations on whole page.

×
×
  • Pasirinkite naujai kuriamo turinio tipą...