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
0
Merge Requests
0
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
chenhao
hel-developer-guide
Commits
c566b699
Commit
c566b699
authored
Jul 31, 2017
by
高洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates common-field-javascript.md
Auto commit by GitBook Editor
parent
5c417fc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
common-field-javascript.md
common-field-javascript.md
+23
-0
No files found.
common-javascript.md
→
common-
field-
javascript.md
View file @
c566b699
##字段级通用方法
*
设置字段必填或者非必填属性Hel.setRequired(id,flag);
#### 设置字段必填属性
>Hel.setRequired(id,flag);
第一个参数id为字段的id,第二个参数flag为true时将该字段设为必填,为false时将该字段设为非必填。
```
html
<h:hlsMaskedTextBox
id=
"maskedTextBox"
/>
<script>
<!
[
CDATA
[
Hel
.
setRequired
(
'maskedTextBox'
,
true
);
]]
>
</script>
```
\ No newline at end of file
```
####设置字段只读属性
>Hel.setReadonly(id,flag);
第一个参数id为字段的id,第二个参数flag为true时将该字段设为只读,为false时将该字段设为可输入。
```
html
<h:hlsMaskedTextBox
id=
"maskedTextBox"
/>
<script>
<!
[
CDATA
[
Hel
.
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