主頁 > 知識(shí)庫 > ASP.NET實(shí)現(xiàn)License Key輸入功能的小例子

ASP.NET實(shí)現(xiàn)License Key輸入功能的小例子

熱門標(biāo)簽:Linux服務(wù)器 阿里云 銀行業(yè)務(wù) 服務(wù)器配置 電子圍欄 Mysql連接數(shù)設(shè)置 團(tuán)購網(wǎng)站 科大訊飛語音識(shí)別系統(tǒng)

 

這個(gè)演示,在輸入時(shí),是不需要與服務(wù)端交互,只有全部輸入完畢之后,用戶點(diǎn)銨鈕才進(jìn)行驗(yàn)證。因此在這里,寫Javascript來實(shí)現(xiàn)即可。

js:

復(fù)制代碼 代碼如下:

script type="text/javascript">
        function JumpToNextTextBox(currentTxtBox, nextTextBoxID) {
            if (currentTxtBox.value.length >= 5) {
                document.getElementById(nextTextBoxID).focus();
            }
        }
    /script>


Html code:

復(fù)制代碼 代碼如下:

  License Key:
            asp:TextBox ID="Number1" runat="server" onkeyup="JumpToNextTextBox(this, 'Number2')" Width="65">/asp:TextBox>
            -
        asp:TextBox ID="Number2" runat="server" onkeyup="JumpToNextTextBox(this, 'Number3')" Width="65">/asp:TextBox>
            -
        asp:TextBox ID="Number3" runat="server" onkeyup="JumpToNextTextBox(this, 'Number4')" Width="65">/asp:TextBox>
            -
        asp:TextBox ID="Number4" runat="server" onkeyup="JumpToNextTextBox(this, 'Number5')" Width="65">/asp:TextBox>
            -
        asp:TextBox ID="Number5" runat="server" MaxLength ="5" Width="65">/asp:TextBox>

標(biāo)簽:大理 衢州 萍鄉(xiāng) 江蘇 廣元 棗莊 衡水 蚌埠

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ASP.NET實(shí)現(xiàn)License Key輸入功能的小例子》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266