它不会直接起作用,但是您可以通过JavaScript中的AJAX调用来分配它们,idk真的知道它在现实世界中是否真的有任何应用程序(可能是服务器期望的参数混淆了)
有
要处理的JS是(使用jQuery处理ajax)
$("#login").on("submit",function(ev){
$.post("someurl",{
usrn: $("#username").val,
pwd: $("#password").val
},function(ev){
//this is the callback function that runs when the call is completed successfully
});
}
/*second argument on $.post is and object with data to send in a post request
usrn would be the name of the parameter recived in the server
same for pwd "#username" and "#password" are the id's html attribute for the field
'.val' is the jquery object's attribute in which jquery access the value in the text box
"$()" or it's equivalent "jQuery()" works like an object constructor that fills
the attributes with the
DOM data that cover the css selector that this function expects as a parameter*/
请注意,由于我尚未测试代码,因此代码可能并不完全正确,但其背后的逻辑应该是不言自明的