Summary of commonly used js methods of pan-micro oa process form

/js/weaver.js

1、checkboxCheck(elementname,spanid)

Function description cancel the red exclamation mark following the check box
Parameter description elementname: check box name attribute
spanid: the id attribute of the corresponding span tag

2、checkinput (elementname,spanid)

Function description Verify whether the value of the input box is empty; when it is not empty, cancel the red exclamation mark following the input box; when it is empty, add the red exclamation mark behind the input box.
Parameter description elementname: check box name attribute
spanid: corresponding span The id attribute of the label
Return value description None

3、checkinput_email (elementname,spanid)

Function description Verify whether the value of the input box conforms to the email format; if it does, cancel the red exclamation mark behind the input box; if it does not, add the red exclamation mark after the input box.
Parameter description elementname: input box name attribute
spanid: corresponding span tag The id attribute
Return value description None

4、checkEmail(emailStr)

Function description Judge whether the string conforms to the mail format
Parameter description emailStr: string value
to be judged Return value description true-conforms, false-nonconformity

5、numberChangeToChinese(num)

Function description Convert numbers to Chinese uppercase
Parameter description num: the number
to be converted Return value description Convert Chen’s Chinese uppercase

6、floatFormat (num)

Function description Format number (number formatted as 2 decimal places)
Parameter description num: the number
to be formatted Return value description formatted number

7、milfloatFormat (num)

Function description Formatting numbers (digits to thousandths display)
Parameter description num: the number
to be converted Return value description formatted number

8、ItemNum_KeyPress (elementname)

Function description Control input box can only enter numbers.
Parameter description elementname: input box name attribute
Return value description None

9、ItemPlusCount_KeyPress ()

Function description Control the current input box can only enter positive integers.
Parameter description None
Return value description None

10、ItemCount_KeyPress ()

Function description Control the current input box can only enter integers.
Parameter description none
Return value description none

11、ItemPhone_KeyPress ()

Function description Control the current input box can only enter numbers, including "-"
Parameter description None
Return value description None

12、ItemDecimal_KeyPress (elementname,p,s)

Function description Control the current input box can only enter numbers, including decimals.
Parameter description elementname: input box name attribute
p (precision): Specify the maximum number of decimal digits that can be stored to the left and right of the decimal point. The precision must be a value from 1 to the maximum precision. The maximum accuracy is 38.
s (Decimal Places): Specify the maximum number of decimal digits that can be stored to the right of the decimal point. The number of decimal places must be a value from 0 to p. The default number of decimal places is 0, so 0 <= s <=
p. The maximum storage size varies based on accuracy.
Return value description

13、getCursortPosition (inputElement)

Function description Get the cursor position
Parameter description InputElement: input box object
Return value description cursor position

14、checkcount(objectname)

Function description Determine whether the input box is a number, excluding the decimal point.
Parameter description objectname: input box name attribute
Return value description true-conforms, false-non-conformity

15、checknumber(objectname)

Function description Determine whether the input box is a number, including a decimal point.
Parameter description objectname: input box name attribute
Return value description true-conforms, false-nonconformity

16、checkPlusnumber1(objectname)

Function description Judge whether the input box is a positive integer
Parameter description objectname: input box name attribute
Return value description true-conforms, false-non-conformity

17、checkphone (objectname)

Function description Determine whether the input box is a number, including "-"
parameter description objectname: input box name attribute
Return value description true-conforms, false-non-conformance

18、checkinput_char_num (objectname)

Function description Determine whether the input box is English letters and numbers, and start with a letter.
Parameter description objectname: input box name attribute
Return value description true-conforms, false-non-conformity

19、checkdecimal_length(elementname,maxlength)

Function description Detect whether the integer part of the decimal number entered in the input box exceeds the limited number of digits. When it does not meet the requirement, the box will prompt and clear the value.
Parameter description elementname: input box name attribute
maxlength: the maximum length of the integer part
Return value description None

20、ellipsis(str,lens)

Function description Intercept the character string, add ellipsis to the character string that exceeds the specified length.
Parameter description str: the string to be checked
Lens: the length of the specified string
Return value indicates the intercepted string

21、trim(s)

Function description Remove the spaces at the beginning and end of the string.
Parameter description s: the string
to be processed. Return value description.

22、openFullWindow(url)

Function description pop-up full-screen window
Parameter description url: url address of the pop-up window
Return value description None


Please leave a message in the comment area and discuss together~~~

If necessary, please contact WeChat: hdygzh2019 At the same time, please explain your intention and make progress together! ! !

Guess you like

Origin blog.csdn.net/Y_6155/article/details/109018191