JavaScript limits input and paste (ie and Firefox 3.x test pass) _javascript tips

Source: Internet
Author: User
<ptml> <pead> <script type= "Text/javascript" > Function Uploadkey (e) {(document.all)? true:false) = = true? (Window.event.returnValue = False): E.preventdefault (); } </script> </pead> <body> <input name= "textfield3" type= "file" class= "input" id= "textfield3" siz E= "value=" "onkeydown=" Uploadkey (event); "Onpaste=" return false; "onmousedown=" Document.oncontextmenu = function ( ) {return false;} onmouseout= ' Document.oncontextmenu = function () {return true;} ' style = ' ime-mode:disabled '/> </body> </pt Ml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]


But this code is below the Firefox 2.x, still can't support the function of Onpaste (), the good news is that the 3.x version of Firefox supports a function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.