[AngularJS] Using an AngularJS directive to hide the keyboard on submit
On to The Using an angularjs directive submit
2023-09-14 08:59:19 时间
Pleasea refer to Link
<form ng-submit="foo()" handle-phone-submit> <input type="text" ng-model="query" name="query" /> <button type="submit">OK</button> </form
angular.module('Foobar', []) .directive('handlePhoneSubmit', function () { return function (scope, element, attr) { var textFields = $(element).children('input[type=text]'); $(element).submit(function() { console.log('form was submitted'); textFields.blur();
document.acvtiveElement.blur(); }); }; });
相关文章
- Maven报错:The packaging for this project did not assign a file to the build artifact[通俗易懂]
- TypeError: ‘Collection‘ object is not callable. If you meant to call the ‘insert‘ method on a ‘Datab
- the driver is not supported on_GetPeDriver
- Cumstom Build VUI On-device Using VoiceHub
- (本地无法连接MySQL服务器)ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)
- Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to th
- ORA-26747: The one-to-many transformation function string encountered the following error: string ORACLE 报错 故障修复 远程处理
- ORA-30556: either functional or bitmap join index is defined on the column to be modified ORACLE 报错 故障修复 远程处理
- ORA-32346: ON COMMIT materialized view refresh caused changes to the master table/materialized view ORACLE 报错 故障修复 远程处理
- ORA-38882: Cannot drop tablespace string on standby database due to guaranteed restore points. ORACLE 报错 故障修复 远程处理
- ORA-55567: The _highthreshold_undoretention value should be at least string based on the current undo retention settings. ORACLE 报错 故障修复 远程处理
- ORA-03122: attempt to close ORACLE-side window on user side ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-011183; Symbol: ER_SEMISYNC_EXECUTION_FAILED_ON_MASTER; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-15743: need to specify the object ID if the tuning task is on a SQL set. ORACLE 报错 故障修复 远程处理
- ORA-16124: transaction string string string is waiting on another transaction ORACLE 报错 故障修复 远程处理
- ORA-16444: ALTER SYSTEM FLUSH REDO TO STANDBY failed due to a corrupted control file or online log file. ORACLE 报错 故障修复 远程处理
- Pl SQL on Linux: Taking Computing to the Next Level(plsqllinux)
- The Ultimate Guide to Playing MP4 Videos on Linux: Everything You Need to Know(linuxmp4)
- Effective Ways to Combat Malware on Linux Platforms: A Guide to Trojans Removal(linux查杀木马)
- Connecting to MySQL Database: A Guide on Establishing a Successful Connection(mysql数据库连接)
- How to Start SVN on Linux: A StepbyStep Guide(svn启动linux)
- Easy Steps to Check Your System Model on Linux for Optimal Performance(linux查看系统型号)
- Oracle内连接ON极大提高数据查询性能(oracle内连接on)
- 尝试攻克決勝難關The A to Z of Redis(the a什么redis)
- Oracle中妙用ON子句优化SQL查询(oracle on子句)
- 使用Oracle On关键字实现数据库连接(oracle on关键字)