javascript手冊-b

back method

Loads the previous URL in the history list.

语法

history.back()

用法

history

描述

This method performs the same action as a user choosing the Back button in the Navigator. The back method is the same as history.go(-1).

例子

The following custom buttons perform the same operations as the Navigator Back and Forward buttons:
<P><INPUT TYPE="button" VALUE="< Back"
   onClick="history.back()">
<P><INPUT TYPE="button" VALUE="> Forward"
   onClick="history.forward()">

See also

  • forward, go methods

    bgColor property

    A string specifying the color of the document background.

    语法

    document.bgColor

    Property of

    document

    描述

    The bgColor property is expressed as a hexadecimal RGB triplet or as one of the string literals listed in Color Values. This property is the JavaScript reflection of the BGCOLOR attribute of the <BODY> tag. The default value of this property is set by the user on the Colors tab of the Preferences dialog box, which is displayed by choosing General Preferences from the Options menu.

    You can set the bgColor property at any time.

    If you express the color as a hexadecimal RGB triplet, you must use the format rrggbb. For example, the hexadecimal RGB values for salmon are red=FA, green=80, and blue=72, so the RGB triplet for salmon is "FA8072".

    例子

    The following example sets the color of the document background to aqua using a string literal:

    document.bgColor="aqua"
    

    The following example sets the color of the document background to aqua using a hexadecimal triplet:

    document.bgColor="00FFFF"
    

    See also

  • alinkColor, fgColor, linkColor, and vlinkColor properties

    big method

    Causes a string to be displayed in a big font as if it were in a <BIG> tag.

    语法

    stringName.big()

    stringName is any string or a property of an existing object.

    用法

    string

    描述

    Use the big method with the write or writeln methods to format and display a string in a document.

    例子

    The following example uses string methods to change the size of a string:
    var worldString="Hello, world"
    
    document.write(worldString.small())
    document.write("<P>" + worldString.big())
    document.write("<P>" + worldString.fontsize(7))
    

    The previous example produces the same output as the following htm:

       &amp;lt;SMALL&amp;gt;Hello, world&amp;lt;/SMALL&amp;gt; &amp;lt;P&amp;gt;&amp;lt;BIG&amp;gt;Hello, world&amp;lt;/BIG&amp;gt; &amp;lt;P&amp;gt;&amp;lt;FONTSIZE=7&amp;gt;Hello, world&amp;lt;/FONTSIZE&amp;gt; 
     

    See also

  • fontsize, small methods

    blink method

    Causes a string to blink as if it were in a <BLINK> tag.

    语法

    stringName.blink()

    stringName is any string or a property of an existing object.

    用法

    string

    描述

    Use the blink method with the write or writeln methods to format and display a string in a document.

    例子

    The following example uses string methods to change the formatting of a string:
    var worldString="Hello, world"
    
    document.write(worldString.blink())
    document.write("<P>" + worldString.bold())
    document.write("<P>" + worldString.italics())
    document.write("<P>" + worldString.strike())
    

    The previous example produces the same output as the following htm:

       &amp;lt;BLINK&amp;gt;Hello, world&amp;lt;/BLINK&amp;gt; &amp;lt;P&amp;gt;&amp;lt;B&amp;gt;Hello, world&amp;lt;/B&amp;gt; &amp;lt;P&amp;gt;&amp;lt;I&amp;gt;Hello, world&amp;lt;/I&amp;gt; &amp;lt;P&amp;gt;&amp;lt;STRIKE&amp;gt;Hello, world&amp;lt;/STRIKE&amp;gt; 
     

    See also

  • bold, italics, strike methods

    blur method

    Removes focus from the specified object.

    语法

    1. passwordName.blur()
    2. selectName.blur()
    3. textName.blur()
    4. textareaName.blur()
    

    passwordName is either the value of the NAME attribute of a password object or an element in the elements array.
    selectName is either the value of the NAME attribute of a select object or an element in the elements array.
    textName is either the value of the NAME attribute of a text object or an element in the elements array.
    textareaName is either the value of the NAME attribute of a textarea object or an element in the elements array.

    用法

    password, select, text, textarea

    描述

    Use the blur method to remove focus from a specific form element.

    例子

    The following example removes focus from the password element userPass:

    userPass.blur()
    
    This example assumes that the password is defined as:
    <INPUT TYPE="password" NAME="userPass">

    See also

  • focus, select methods

    bold method

    Causes a string to be displayed as bold as if it were in a <B> tag.

    语法

    stringName.bold()

    stringName is any string or a property of an existing object.

    用法

    string

    描述

    Use the bold method with the write or writeln methods to format and display a string in a document.

    例子

    The following example uses string methods to change the formatting of a string:
    var worldString="Hello, world"
    
    document.write(worldString.blink())
    document.write("<P>" + worldString.bold())
    document.write("<P>" + worldString.italics())
    document.write("<P>" + worldString.strike())
    

    The previous example produces the same output as the following htm:

    <BLINK>Hello, world</BLINK>
    <P><B>Hello, world</B>
    <P><I>Hello, world</I>
    <P><STRIKE>Hello, world</STRIKE>
    

    See also

  • blink, italics, strike methods

    button object

    A pushbutton on an htm form.

    语法

    To define a button:

    <INPUT
       TYPE="button"
       NAME="buttonName"
       VALUE="buttonText"
       [onClick="handlerText"]>
    
    NAME="buttonName" specifies the name of the button object. You can access this value using the name property.
    VALUE="buttonText" specifies the label to display on the button face. You can access this value using the value property.

    To use a button object's properties and methods:

    1. buttonName.propertyName
    2. buttonName.methodName(parameters)
    3. formName.elements[index].propertyName
    4. formName.elements[index].methodName(parameters)
    
    buttonName is the value of the NAME attribute of a button object.
    formName is either the value of the NAME attribute of a form object or an element in the forms array.
    index is an integer representing a button object on a form.
    propertyName is one of the properties listed below.
    methodName is one of the methods listed below.

    Property of

  • form

    描述

    A button object on a form looks as follows:

    A button object is a form element and must be defined within a <FORM> tag.

    The button object is a custom button that you can use to perform an action you define. The button executes the script specified by its onClick event handler.

    Properties

  • name reflects the NAME attribute
  • value reflects the VALUE attribute

    Methods

  • click

    Event handlers

  • onClick

    例子

    The following example creates a button named calcButton. The text "Calculate" is displayed on the face of the button. When the button is clicked, the function calcFunction() is called.

       &amp;lt;INPUT TYPE="button" VALUE="Calculate" NAME="calcButton" onClick="calcFunction(this.form)"&amp;gt; 
     

    See also

  • form, reset, and submit objects
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Photoshop CC JavaScript手册是一本专门为用户提供Photoshop CC的JavaScript编程指南的参考手册。Photoshop CC是一款功能强大的图像处理软件,而JavaScript是一种流行的编程语言,用于开发Web应用程序和扩展脚本。这本手册提供了关于如何使用JavaScript编写自定义脚本来扩展和自动化Photoshop CC功能的详细信息和说明。 手册首先介绍了Photoshop CC的基本知识,包括如何启动和配置JavaScript脚本运行环境以及如何与Photoshop CC的开发工具集集成。然后,手册详细介绍了Photoshop CC的各种功能和API,包括图像处理、图层管理、文本处理、滤镜应用等。每个功能和API都有详细的说明和代码示例,以帮助用户理解和使用。 手册还包括了一些常见的任务和问题的解决方案,比如如何创建自定义工具、如何批量处理图像、如何应用滤镜效果等。这些解决方案可以帮助用户更好地了解和应用Photoshop CC的JavaScript编程功能。 此外,手册还提供了一些实用的技巧和技巧,帮助用户提高编程效率和开发质量。例如,如何调试JavaScript代码、如何优化性能、如何处理错误等。 总而言之,Photoshop CC JavaScript手册是一本非常有用的参考工具,可以帮助用户学习和掌握如何使用JavaScript编程来扩展和自动化Photoshop CC的功能。无论是初学者还是有经验的开发人员,都可以从这本手册中获得宝贵的知识和指导。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值