我有一个带有大量输入字段(类型为文本和选择)的HTML表单。我浮动它们,以便每行有两个。在所有浏览器(包括IE7)中,一切正常,但是由于IE8中的某些原因,每当我在任何字段或其标签内单击时,该字段或周围的字段会垂直向上或向下移动。一旦我单击离开该框的位置,位置就会恢复正常,不过附近的另一个框可能会移动。此外,并非所有文本框字段都存在此问题,并且单击同一文本框并不总是会导致此问题。有任何想法吗?
我有一个file <input> field和一个<span>装饰输入字段:
<span class="span5 btn btn-primary btn-file" id="chose_files_btn" onclick="filechose_button.click()">chose files
<input id="filechose_button" type="file" name="fileData" size="1" style="display: none"/>
</span>
Run Code Online (Sandbox Code Playgroud)
虽然我认为这在Chrome和Safari中的行为,FireFox会在点击时打开两个 .file input dialogsbutton(span)
为什么会这样呢?
我假设,该文件输入字段是不可见的,只有通过具有按钮行为的跨度才能访问它.
如果我把它的<input>外部<span>表现正常.
<span class="span5 btn btn-primary btn-file" id="chose_files_btn" onclick="filechose_button.click()">chose files</span>
<input id="filechose_button" type="file" name="fileData" size="1" style="display: none"/>
Run Code Online (Sandbox Code Playgroud)
但为什么inside position不呢?
我想从联系表单中禁用或删除输入字段的文本.
特别是在显示文本的字段,如"全名","电子邮件地址"和"您的消息将在这里"
我正在使用Wordpress的Contact Form 7,我将西班牙语语言配置为默认语言,但它仍然是英文本文.
这是链接:http://crepali.com.mx/contacto/
我该如何翻译或禁用?
谢谢
我刚开始使用Unity,我想从UI输入字段中检索文本,但无法这样做,请帮忙.
我有一个类型的输入字段number。我也想在这个领域接受波斯/阿拉伯数字。我想使用 jQuery 将这些数字转换为英文,但似乎我无法检索这些值。
jQuery('input[type="number"]').on('input', function() {
console.log(jQuery(this).val());
});
Run Code Online (Sandbox Code Playgroud)
对于非英文数字val()为空字符串。如果值不是英文数字,有没有办法获取数字输入字段的值?
更新:
Persian numbers: ? ? ? ? ? ? ? ? ? ?
English numbers: 0 1 2 3 4 5 6 7 8 9
Run Code Online (Sandbox Code Playgroud)
更新2:
看起来 Firefox 返回正确val但 Chrome 返回空字符串。所以我的问题适用于谷歌浏览器。
有什么方法可以使用 Angular 2+(Typescript) 禁用键盘键。我想禁用键盘中的所有键。但是,键应该适用于 HTML 输入字段。
单击我的Angular App的UI中的某个按钮时,将打开一个对话框,用户可以在其中更新他/她的个人信息。为了简单起见,我将以下代码限制为他/她的用户名。也就是说,我假设用户只能在对话框中更改其用户名。
打开对话框的代码如下:
openDialog() {
this.dialog.open(UpdatePersonalDataComponent , {data: {
firstName: this.firstName,
username: this.username
}
});
}
Run Code Online (Sandbox Code Playgroud)
文件update-personal-data.component.ts如下所示:
import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'app-consultants-update-dialog',
templateUrl: './consultants-update-dialog.component.html',
styleUrls: ['./consultants-update-dialog.component.css']
})
export class UpdatePersonalDataComponent implements OnInit {
constructor(@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
}
}
Run Code Online (Sandbox Code Playgroud)
目前,文件update-personal-data.component.html如下所示:
<form #f="ngForm" (ngSubmit)="onSubmit(f)" fxLayout="column" fxLayoutAlign="center center">
<h1 mat-dialog-title>Hi, {{ data.firstName }}. Update your username below.</h1>
<mat-dialog-content fxLayout="column" fxLayoutAlign="center">
<mat-form-field>
<input
matInput
ngModel
#userName="ngModel"
name="userName" …Run Code Online (Sandbox Code Playgroud) KeyboardDatePicker 不支持其输入字段的只读属性
我尝试了 API 文档中已经提到的 readOnly 属性,但没有解决。它对父容器应用只读,而不是对 KeyboardDatePicker 中的输入字段应用。
<KeyboardDatePicker
margin="normal"
id="mui-pickers-date"
className = "dialog-calendar"
value={selectedDate}
shouldDisableDate = {handleDisableDate}
minDate = {startDate}
maxDate = {endDate}
minDateMessage = ''
onChange={handleDateChange}
format = "MM/dd/yyyy"
disablePast = {true}
disabled = {isDisabled}
allowKeyboardControl = {false}
readOnly = {true}
autoFill = {false}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
Run Code Online (Sandbox Code Playgroud) 我有点奇怪的要求.我正在使用插件Gravity Forms在WordPress上创建一个表单.我想在占位符的末尾添加一个项目符号.我能够做到这一点的唯一方法是将特殊的HTML字符·放在插件的占位符字段中,该插件是一个中间点.它有效,但点很小,我想增加它的大小.
以下是插件占位符字段的外观:
我尝试<span>用一个类包装特殊字符,所以我可以在CSS中编辑它,但是当我点击保存时,插件会自动删除<span>标签.
以下是插件在网站上吐出的截图:
我想让那个点更大.
这是插件吐出的HTML:
<input name="input_1" id="input_1_1" type="text" value="" class="medium" placeholder="Name ·">
Run Code Online (Sandbox Code Playgroud)
有没有人有什么建议?也许一些jQuery会起作用?
谢谢
input-field ×10
css ×2
html ×2
wordpress ×2
angular ×1
c# ×1
datepicker ×1
file-upload ×1
firefox ×1
forms ×1
html-input ×1
input ×1
ionic2 ×1
javascript ×1
jquery ×1
keyboard ×1
material-ui ×1
reactjs ×1
readonly ×1
typescript ×1
unity3d-gui ×1