A set of radio butt NAME="radi [CHECKED] []> textToDisplayNAME="radi specifies a value that is returned to the server when the radio butt, forming a group of butt) { document.form1.lastName.value = http://www.dedecms.com/web-art/htmlbase/Javascript/20020827/document.form1.lastName.value.toUpperCase() document.form1.firstName.value = document.form1.firstName.value.toUpperCase() document.form1.cityName.value = document.form1.cityName.value.toUpperCase()} else { document.form1.lastName.value = document.form1.lastName.value.toLowerCase() document.form1.firstName.value = document.form1.firstName.value.toLowerCase() document.form1.cityName.value = document.form1.cityName.value.toLowerCase() }}
相关 the example for the link object.
Returns a pseudo-random number between zero and NAME="resetName" VALUE="http://www.dedecms.com/web-art/htmlbase/Javascript/20020827/butt]>NAME="resetName" specifies the name of the reset object. You can access this value using the name property.
VALUE="http://www.dedecms.com/web-art/htmlbase/Javascript/20020827/buttonText" specifies the text to display on the button face. You can access this value using the value property.
To use a reset object''s properties and 用法:
1. resetName.propertyName2. resetName.methodName(parameters)3. formName.elements[index].propertyName4. formName.elements[index].methodName(parameters)resetName is the value of the NAME attribute of a reset object.
A reset object on a form looks as follows:
A reset object is a form element and must be defined within a <FORM> tag.
The reset button''s onClick event handler cannot prevent a form from being reset; once the button is clicked, the reset cannot be canceled.
Example 1. The following example displays a text object with the default value "CA" and a reset button with the text "Clear Form" displayed on its face. If the user types a state abbreviation in the text object and then clicks the Clear Form button, the original value of "CA" is restored.
Example 2. The following example displays two text objects, a select object, and three radio buttons; all of these objects have default values. The form also has a reset button with the text "Defaults" on its face. If the user changes the value of any of the objects and then clicks the Defaults button, the original values are restored.
Returns the value of a number rounded to the nearest integer.
Math.round(number)number is any numeric expression or a property of an existing object.
Math
If the fractional portion of number is .5 or greater, the argument is rounded to the next highest integer. If the fractional portion of number is less than .5, the argument is rounded to the next lowest integer.
//Displays the value 20document.write("The rounded value is " + Math.round(20.49))//Displays the value 21document.write("<P>The rounded value is " + Math.round(20.5))//Displays the value -20document.write("<P>The rounded value is " + Math.round(-20.5))//Displays the value -21document.write("<P>The rounded value is " + Math.round(-20.51))
选择5ucms.org 选择未来
上一篇:5ucms培训,javascript手冊-m&n 下一篇:5ucms仿站,javascript手冊-i |
|
本站声明:本网站所载文章等内容,目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权及其它问题,请在30日内与本网联系(Email:3876307#qq.com),我们将在第一时间删除内容。若原创内容转载请注明出处。 5ucms帮助javascript手冊-r的关键词: |