What to submit to HTML 5 when no value

I was wondering what form of HTML should be sent if no input is given.

I have a smarty PHP project which has some forms. One of the forms has this input:

<form name="frm_login" method="POST">  
...            
    <div class="login-button">                            
        <input class="button-short" type="submit" name="send_login" onclick="return storeSelector.checkStoreId()">
    </div>
</form>

Chrome and Cliqz see this:

<input class="button-short" type="submit" name="send_login" onclick="return storeSelector.checkStoreId()">

IE 11 sees this

<input name="send_login" class="button-short" onclick="return storeSelector.checkStoreId()" type="submit" value="Anfrage senden">

And my "own" browser (CefSharp version 1.25) sees this: // I know that it is no longer supported ... but you know .Net 2.0

<input class="button-short" type="submit" name="send_login" onclick="return storeSelector.checkStoreId()">

So when I click submit

  • Chrome sends to $_Post["send_login"] "Submit"
  • IE11 sends to $_Post["send_login"] "Anfrage Senden"> German request to send
  • My browser sends to $_Post["send_login"] ""
  • Cliqz sends $_Post["send_login"] "Daten Absenden"<- German for sending data

It was interesting to me:

  • What is the correct behavior if no value is given?
  • If the browser sends something that it likes, or correctly send nothing?
  • -, RFC?
+4
1

HTML 5.1

, ?

, .

content value . content value , , , content value, , , , .

https://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html#attr-input-value

-, , ?

, . 4.01, .

  1. -, .

.

-, RFC?

, https://tools.ietf.org/html/rfc1866#section-8.2. .

HTML 4.01

, ?

, undefined.

" " . .

. , reset, reset . , reset on undefined.

https://www.w3.org/TR/html401/interact/forms.html#current-value

-, , ?

, .

, .

, .

-, RFC?

, https://tools.ietf.org/html/rfc1866#section-8.2. .

+4

Source: https://habr.com/ru/post/1663223/


All Articles