茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    input type是什么意思及常用限制input的方法
    來源:易賢網(wǎng) 閱讀:1615 次 日期:2016-06-16 09:20:24
    溫馨提示:易賢網(wǎng)小編為您整理了“input type是什么意思及常用限制input的方法”,方便廣大網(wǎng)友查閱!

    常用限制input的方法

    1.取消按鈕按下時的虛線框,在input里添加屬性值 hidefocus 或者hidefocus=true

    代碼如下:

    <input type=submit value=提交 hidefocus=true />

    2.只讀文本框內(nèi)容,在input里添加屬性值 readonly

    代碼如下:

    <input type=text readonly />

    3.防止退后清空的text文檔(可把style內(nèi)容做做為類引用)

    代碼如下:

    <input type=text style=behavior:url(#default#savehistory); />

    4.enter鍵可以讓光標移到下一個輸入框

    代碼如下:

    <input type=text onkeydown=if(event.keycode==13)event.keycode=9 />

    5.只能為中文(有閃動)

    代碼如下:

    <input type=text onkeyup=value=value.replace(/[ -~]/g,'') onkeydown=if(event.keycode==13)event.keycode=9 />

    6.只能為數(shù)字(有閃動)

    代碼如下:

    <input type=text onkeyup=value=value.replace(/[^\d]/g,'') onbeforepaste=clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,'')) />

    7.只能為數(shù)字(無閃動)

    <input type=text style=ime-mode:disabled onkeydown=if(event.keycode==13)event.keycode=9 onkeypress=if ((event.keycode<48 || event.keycode>57)) event.returnvalue=false />

    8.只能輸入英文和數(shù)字(有閃動)

    代碼如下:

    <input type=text onkeyup=value=value.replace(/[\w]/g,'') onbeforepaste=clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,'')) />

    9.屏蔽輸入法

    代碼如下:

    <input type=text name=url style=ime-mode:disabled onkeydown=if(event.keycode==13)event.keycode=9 />

    10. 只能輸入 數(shù)字,小數(shù)點,減號(-) 字符(無閃動)

    代碼如下:

    <input onkeypress=if (event.keycode!=46 && event.keycode!=45 && (event.keycode<48 || event.keycode>57)) event.returnvalue=false />

    11. 只能輸入兩位小數(shù),三位小數(shù)(有閃動)

    代碼如下:

    <input type=text maxlength=9 onkeyup=if(value.match(/^\d{3}$/))value=value.replace(value,parseint(value/10)) ;value=value.replace(/\.\d*\./g,'.') onkeypress=if((event.keycode<48 || event.keycode>57) && event.keycode!=46 && event.keycode!=45 || value.match(/^\d{3}$/) || /\.\d{3}$/.test(value)) {event.returnvalue=false} />

    更多信息請查看網(wǎng)頁制作
    下一篇:html元素:dd
    易賢網(wǎng)手機網(wǎng)站地址:input type是什么意思及常用限制input的方法
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇剩?/div>

    2026上岸·考公考編培訓報班

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)