久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

jQuery 屏蔽輸入插件.當(dāng)文本框獲得焦點時選擇所有

jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽輸入插件.當(dāng)文本框獲得焦點時選擇所有內(nèi)容)
本文介紹了jQuery 屏蔽輸入插件.當(dāng)文本框獲得焦點時選擇所有內(nèi)容的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

這是這個問題的后續(xù)問題:

This is a followup question to this question:

選擇文本框的所有內(nèi)容當(dāng)它獲得焦點時(Javascript 或 jQuery)

基本上我將文本框與 jQuery 屏蔽輸入插件結(jié)合使用(鏈接可能不再指向相關(guān)版本)

Basically I am using a textbox in conjunction with the jQuery masked input plugin( Link may no longer point at relevant version)

當(dāng)被屏蔽的輸入文本框獲得焦點時,我想選擇該文本框的所有內(nèi)容,但似乎將此插件綁定到文本框會阻止這種情況.我只是想知道是否有辦法解決這個問題.

When the masked input textbox receives focus I want to select all of the contents of that textbox, but it seems as though having this plugin binded to the textbox prevents that. I was just wondering if there was a way around this.

以下是演示該問題的示例 .html 頁面:

Below is a sample .html page that demonstrates the issue:

<html>
<head>
    <title></title>
</head>
<body>
    <input id="masktest" type="text" value="01/01/2009" />
    <br />
    <input id="focustest" type="text" value="on focus will select all contents..." />

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script type="text/javascript" src="http://jquery-joshbush.googlecode.com/files/jquery.maskedinput-1.2.1.pack.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#masktest").mask("99/99/9999");

            // Contents of textboxes will be selected when receiving focus.
            $("input[type=text]")
                .focus(function() {
                    $(this).select();
                });
        });
    </script>
</body>
</html>

推薦答案

我是 用于 jQuery 的屏蔽輸入插件.我決定這應(yīng)該是已完成掩碼的默認(rèn)行為,并將其放入最新版本.您可以閱讀詳細(xì)信息這里

I'm the author of the Masked Input Plugin for jQuery. I decided that this should be the default behavior for completed masks and I got it into the latest release. You can read the details here

這篇關(guān)于jQuery 屏蔽輸入插件.當(dāng)文本框獲得焦點時選擇所有內(nèi)容的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

jQuery/JavaScript Library for avatar creation?(用于創(chuàng)建頭像的 jQuery/JavaScript 庫?)
How to do following mask input problem?(如何做以下掩碼輸入問題?)
Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 設(shè)置值/標(biāo)簽的問題)
how to unit-test private methods in jquery plugins?(如何對 jquery 插件中的私有方法進(jìn)行單元測試?)
stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 為垂直滾動網(wǎng)站配置偏移量/對齊元素?)
Is it possible to force jQuery.jScrollPane to always show a vertical scroll-bar?(是否可以強(qiáng)制 jQuery.jScrollPane 始終顯示垂直滾動條?)
主站蜘蛛池模板: 欧美日韩成人在线 | 激情五月婷婷综合 | 超级乱淫av片免费播放 | 亚洲精品久久久久久久久久久久久 | 久久久久国产一区二区三区 | 观看av| 国产精品一区二区无线 | 成年网站在线观看 | 美女黄色在线观看 | www亚洲精品| 免费看欧美一级片 | 国产欧美一区二区精品久导航 | 中文字幕在线免费观看 | 国产精品久久久久久久午夜片 | 精品国产第一区二区三区 | 成人久久18免费网站 | www.久久99| 中文字幕在线看 | 久久专区 | 国产一区二区三区四区五区加勒比 | 美女久久 | 国产日韩精品视频 | 亚洲成人一二区 | 精品一区二区三区视频在线观看 | 天堂在线网 | 91社区在线观看 | 国产精品久久久久无码av | 欧美在线不卡 | 亚洲成av人片在线观看无码 | 久久精品成人一区 | 日韩精品视频一区二区三区 | 2018天天干天天操 | 91 视频网站 | 天天弄 | 成年人黄色一级毛片 | 东京av男人的天堂 | 日本不卡一区二区三区 | 欧美亚洲免费 | 亚洲 欧美 精品 | 韩国精品一区二区三区 | 国产精品国产a级 |