相关疑难解决方法(0)

对于HTML表单输入字段,disabled ="disabled"和readonly ="readonly"之间的区别是什么?

我已经对此有所了解,但我似乎无法找到关于不同浏览器如何处理事物的任何信息.

html cross-browser

398
推荐指数
5
解决办法
21万
查看次数

残疾人投入的价值将不会提交?

这是我在firefox中找到的fireBug.

在其他浏览器中是否相同?

如果是这样,原因是什么?

forms http-post form-submit disabled-input

205
推荐指数
6
解决办法
17万
查看次数

禁用表单字段不提交数据

有没有办法(使用属性标志或类似的东西)启用禁用提交数据的表单字段?

或者,如果那是不可能的,有没有办法阻止字段使用css或任何其他属性进行编辑而不是隐藏它们?

我的特殊情况是一个数据集的标识符,应该以表格形式显示(不可编辑) - 如果没有更好的解决方案,我想我会使用一个隐藏字段,除了被禁用的字段以保持实际显示它的已禁用值.

html css forms disabled-input

140
推荐指数
5
解决办法
11万
查看次数

提交已禁用输入字段的值

我想禁用输入字段,但是当我提交表单时,它仍然应该传递值.

使用案例:我试图从谷歌地图获取经度和经度并想要显示它,但我不希望用户编辑它.

这可能吗?

html javascript

89
推荐指数
3
解决办法
9万
查看次数

在Laravel 5.7中发布请求---错误 - 419抱歉,您的会话已过期

我安装了Laravel 5.7

在文件中添加了一个表单 \resources\views\welcome.blade.php

<form method="POST" action="/foo" >
    @csrf
    <input type="text" name="name"/><br/>
    <input type="submit" value="Add"/>
</form>
Run Code Online (Sandbox Code Playgroud)

添加到文件 \routes\web.php

Route::post('/foo', function () {
    echo 1;
    return;
});
Run Code Online (Sandbox Code Playgroud)

发送POST请求后:

419抱歉,您的会话已过期.请刷新并重试.

在版本5.6中没有这样的问题.

php laravel

50
推荐指数
13
解决办法
9万
查看次数

Disable bootstrap switch after onswitchchange

I am new at coding with bootstrap and jquery. how can i disable bootstrap switch in "onswitchchange" method option

Here my javascript/jquery code:

$("input[type=checkbox]").bootstrapSwitch({
    size:"mini",
    onSwitchChange:function(event, state) {
      this.disabled = true; //checkbox change into disabled
    }
  });
Run Code Online (Sandbox Code Playgroud)

i also tried to change this.disabled = true into $(this).setDisabled(true); and it returning error of course. i just want to know how to call setDisable method inside onswitchchange method. if it cannot be like that. is there any other way to disable the …

javascript jquery twitter-bootstrap bootstrap-switch

5
推荐指数
1
解决办法
4709
查看次数

从request.getParameter()获取Null值

在我的应用程序中,在加入的帮助下,我在我的jsp页面中显示动态值,如下所示:

<%  while(rs.next()){ %>
<td><input type="checkbox" name="chkName" onclick="selectall()"></td> 
<td><input type="text"  name="empId" value="<%= rs.getString(1)%> "   disabled="disabled"  maxlength="10"></td>
<td><input type="text" name="device" value="<%= rs.getString(2)%>"   disabled="disabled" maxlength="10"></td>
<td><input type="text"  name="features" value="<%= rs.getString(3)%>"  disabled="disabled" maxlength="60"></td>
<td><input type="password" name="password" disabled="disabled"></td>
<td><input type="text"  name="policyName" value="<%= rs.getString(4)%>"  disabled="disabled" maxlength="10"></td>
</tr>
<% } 
%>
Run Code Online (Sandbox Code Playgroud)

每当从另一个servlet(因为我想显示从这个jsp到另一个jsp的提取)我正在调用时request.getParameter("empId"),它正在获取"NULL"值.我想,我必须使用set(session.setAttribute()request.setParameter()).

任何建议将不胜感激.

jsp servlets

1
推荐指数
1
解决办法
1万
查看次数

html禁用输入文本发布表单

那是我的测试代码:

<?php
if(isset($_POST['Submit']))
{
    if(isset($_POST['Est1'])) echo 'Est1 : ' . $_POST['Est1'] . '<br>';
    if(isset($_POST['Est2'])) echo 'Est2 : ' . $_POST['Est2'] . '<br>';
    if(isset($_POST['Est3'])) echo 'Est3 : ' . $_POST['Est3'] . '<br>';
    if(isset($_POST['Est4'])) echo 'Est4 : ' . $_POST['Est4'] . '<br>';
}
?>
<form method="post">
    <input type="text" name="Est1" id="Val1" value=""/>
    <input type="text" name="Est2" id="Val2" value=""/>
    <input type="text" name="Est3" id="Val3" value=""/>
    <input type="text" name="Est4" id="Val4" value="test" disabled="disabled"/>
    <input type="submit" name="Submit" value="Submit" />
</form>
Run Code Online (Sandbox Code Playgroud)

在这种形式中,当我发送输入的值时,Est4永远不会返回:isset($ _ POST ['Est4'])返回false!

为什么?

html php post input

1
推荐指数
1
解决办法
3122
查看次数