Jump to content

Would something like the following not work?

 

var curDoc = document;

curDoc.onkeydown = function(e) {
	e = e || window.event;
	if (e.keyCode == 13) {
		//Your code here
		e.preventDefault();
	}
};

 

Opera may require you to use onkeypress, not 100% just remember there being some problems with opera

Edited by MSVSora
Missed possible bug with opera
Link to post
Share on other sites

7 hours ago, WannaBeeComputerGeek said:

im using javascript 

JQuery is a library built upon JavaScript to improve the programming experience. It can be added to any project for free by linking the JQuery script before your code. If possible, I would suggest using it because it really is superior 

15" MBP TB

AMD 5800X | Gigabyte Aorus Master | EVGA 2060 KO Ultra | Define 7 || Blade Server: Intel 3570k | GD65 | Corsair C70 | 13TB

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×