css - 为什么单击此提交按钮时没有任何反应?

标签 css forms

我在创建图像提交按钮时遇到问题。当我点击它时,没有任何反应。这是我的代码:

<input type="image" src="notify_me.png" name="submit" id="submit" OnClick="this.disabled = true" value=""/>

if($_POST) {

最佳答案

点击事件需要提交表单:

<input type="image" src="notify_me.png" onclick="document.forms[0].submit();" />

您还应该使用提交类型的输入:

<input type="submit" style="width:(width); height:(height); background-image:url('notify_me.png'); border:none; padding:0;" />

关于css - 为什么单击此提交按钮时没有任何反应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10167909/

相关文章:

jQuery - 添加/删除表单中的输入字段

javascript - div 可见性不断切换

html - CSS 反增量不适用于嵌套的 div 和 h3 元素

PHP - 如何在索引页上打印登录表单上的错误?

forms - Access 2003 表单边框的大小无法保持正确

javascript - PHP 表单提交和 AJAX 验证

Javascript、getElementById 和样式不起作用 : Uncaught TypeError: Cannot read property 'style' of null

css - 背景图片慢速滚动

html - 如何或是否可以将 helvetica 或类似字体与我的网络应用程序一起发布?

python - Django 表单和初始值