久久久久久久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 始終顯示垂直滾動條?)
主站蜘蛛池模板: 久草视频2 | 亚洲精品专区 | 伦理午夜电影免费观看 | 欧美1区| 成人国产在线视频 | 成人国产网站 | 99re视频在线观看 | 精品综合| 久久高清免费视频 | 日本高清视频在线播放 | 男女性毛片 | 国产精品片aa在线观看 | 日韩精品一区二区三区免费视频 | 先锋影音资源网站 | 国产免费让你躁在线视频 | 日韩精品一区二区三区中文字幕 | 日韩欧美三级在线 | 亚洲免费在线 | 欧美日韩成人一区二区 | 亚洲精品免费在线观看 | 国产伦精品一区二区三区照片91 | 99精品视频在线观看免费播放 | 天天综合网天天综合 | 成人久久久 | 精品国产91乱码一区二区三区 | 成人久久久久久久久 | 91精品国产自产精品男人的天堂 | 一级欧美视频 | 日韩三极 | 久久久女女女女999久久 | 免费观看的av毛片的网站 | 中文久久| 羞羞网站在线观看 | 亚洲精品一区二区三区在线 | 国产三级精品三级在线观看四季网 | 中文字幕在线免费观看 | 久热久| 日日夜夜精品免费视频 | 日韩三级一区 | 龙珠z在线观看 | 五月激情婷婷在线 |