Giter Club home page Giter Club logo

Comments (3)

sentsim avatar sentsim commented on June 14, 2024

Layui 对 <input type="number"> 的内容格式没有做相关限制,浏览器允许对 number 框输入正负数值,即诸如 - +这些字符都是被许可的,如 -11。但是,考虑到 number 框同时还支持浮点型和科学计数法,除了 - +,还会涉及到 . e 等字符,如 -1.11 1.1e-11,格式的判断可谓纷繁复杂。因此我建议,如果业务对数据类型敏感,直接对 <input> 设置 readonly 可能会更好

from layui.

Sight-wcg avatar Sight-wcg commented on June 14, 2024

<input type="number"> 目前只是对原生 input number 的美化,行为和原生基本一致,2.x 暂不考虑做调整。

from layui.

Sight-wcg avatar Sight-wcg commented on June 14, 2024

https://bugzilla.mozilla.org/show_bug.cgi?id=1398528

from layui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.