JQUERY create toggle between input types after pressing enter jquery - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

how to create toggle between input types after pressing enter using jquery ?


 102

JQUERY


0

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js "></script>
</head>

<body>

<input id="myID" type="text" value="password">

<script type="text/javascript">

$(document).ready(function () {

$(document).keydown(function (e) {

switch (e.which) {
case 13:

var o = $("#myID").attr("type");
if (o == "text") {$("#myID").attr("type", "password")}else{$("#myID").attr("type", "text")}
break;

}

});

});

</script>

</body>

</html>


By     Created   
The power of the user (%)
6%



The most helpful JQUERY solutions

plugin get client ip address using jqueryplugin get client ip address using jqueryJQUERY

Click to see more ...

  6.7K     1.5K

How to get client machine name or computer name with jquery?How to get client machine name or computer name with jquery?JQUERY

Click to see more ...

  5.9K     728

plugin detect country jqueryplugin detect country jqueryJQUERY

Click to see more ...

  2.7K     571

cookie jquerycookie jqueryJQUERY

Click to see more ...

  2.2K     396

show position on google map jqueryshow position on google map jqueryJQUERY

Click to see more ...

  1.7K     387

how to create a jquery plugin for converting date to days ago, month ago and year ago ?how to create a jquery plugin for converting date to days ago, month ago and year ago ?JQUERY

Click to see more ...

  1.4K     313

How to detect the version of IE browser using jquery ?How to detect the version of IE browser using jquery ?JQUERY

Click to see more ...

  1.2K     311

plugin convert thousands to K jqueryplugin convert thousands to K jqueryJQUERY

Click to see more ...

  1.2K     261

How to get top, right, left, bottom position of element div using jquery ?How to get top, right, left, bottom position of element div using jquery ?JQUERY

Click to see more ...

  1.1K     229

how to get ip address using jquery ?how to get ip address using jquery ?JQUERY

Click to see more ...

  1.2K     227