Home >Web Front-end >HTML Tutorial >What is the difference between form acrion='#' action='' and no writing_html/css_WEB-ITnose

What is the difference between form acrion='#' action='' and no writing_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:59:361345browse

As in the title, action is submitted to this page, refreshed, action="", refreshed, corresponding to input tags and the like, pressing enter will automatically submit, but action="javascript:void(0)" ,In this way, you don’t need to submit, and the press enter will not trigger it. But is this way of writing scientific?


Reply to discussion (solution)



Action If nothing is written, it means the current path
If it is written, it means the relative path For example, # is considered to be the current path with #

javascript:void(0)
means executing the javascript protocol

Support the answer on the 1st floor

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn