GithubHelp home page GithubHelp logo

一些小技巧的总结 about blog HOT 1 OPEN

youngwind avatar youngwind commented on May 15, 2024
一些小技巧的总结

from blog.

Comments (1)

cagen avatar cagen commented on May 15, 2024

关于问题1,最近正好有看到相关文章,原因在于隐式提交这一HTML规范
分情况讨论:

  1. 如果表单中有提交按钮(且不为disabled状态),则在input框中回车可以触发隐式提交,不论有多少个field,在特定的field中就能够触发。
  2. 如果表单中没有提交按钮
  • 表单只有一个field的话,回车触发隐式提交。
  • 多于一个field的话,回车不能触发隐式提交。能够阻止隐式提交规则的field类型也有固定,只能是input ,且type有所限定。

我觉得这种规则就是为了类似搜索框这种单个输入域而出现的

from blog.

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.