Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hel-guide
hel-developer-guide
Commits
bc9a0a2f
Commit
bc9a0a2f
authored
Sep 15, 2017
by
刘鹏程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update common-field-javascript.md
parent
faed96fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common-field-javascript.md
common-field-javascript.md
+4
-4
No files found.
common-field-javascript.md
View file @
bc9a0a2f
###字段级通用方法
#### 设置字段必填属性
>H
el
.setRequired(id,flag);
>H
ls
.setRequired(id,flag);
第一个参数id为字段的id,第二个参数flag为true时将该字段设为必填,为false时将该字段设为非必填。
```
html
<h:hlsMaskedTextBox
id=
"maskedTextBox"
/>
<script>
<!
[
CDATA
[
H
el
.
setRequired
(
'maskedTextBox'
,
true
);
H
ls
.
setRequired
(
'maskedTextBox'
,
true
);
]]
>
</script>
```
#### 设置字段只读属性
>H
el
.setReadonly(id,flag);
>H
ls
.setReadonly(id,flag);
第一个参数id为字段的id,第二个参数flag为true时将该字段设为只读,为false时将该字段设为可输入。
```
html
<h:hlsMaskedTextBox
id=
"maskedTextBox"
/>
<script>
<!
[
CDATA
[
H
el
.
setReadonly
(
'maskedTextBox'
,
true
);
H
ls
.
setReadonly
(
'maskedTextBox'
,
true
);
]]
>
</script>
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment