html里面选项卡功能,Toolbox, HTML Tab

Toolbox, HTML Tab

11/15/2016

7 分钟可看完

本文内容

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to Visual Studio 2019. Download it here

The HTML tab of the Toolbox provides components that are useful on Web pages and Web forms. To view this tab, first open a document for editing in the HTML designer. On the View menu, click Toolbox, and then click the HTML tab of the Toolbox.

To create an instance of a tool on the HTML tab, either double-click the tool to add it to your document at the current insertion point, or select the tool and drag it to the desired position on the editing surface.

Tasks

UI Elements

The following tools are available by default on the HTML tab.

Pointer

320540cbfe0314f74d9d23c4a1cb3692.gif

This tool is selected by default when any Toolbox tab opens. It cannot be deleted. The pointer enables you to drag objects onto the Design view surface, resize them, and reposition them on the page or form. For more information, see How to: Manage the Toolbox Window and How to: Manipulate Toolbox Tabs.

Input (Button)

11f63ad90b35ec7c1c127fd291479376.gif

Inserts an input element of type="button". To change the text that is displayed, edit the name property. By default, id="Button1" is inserted for the first button, id="Button2" for the second, and so on.

When you drag Input (Button) onto the Design view surface, HTML markup like the following is inserted into your document:

Input (Reset)

8720a66b1891f69a47e208ecb8d2458d.gif

Inserts an input element of type="reset". To change the text that is displayed, edit the name property. By default, id="Reset1" is inserted for the first reset button, id="Reset2" for the second, and so on.

When you drag Input (Reset) onto the Design view surface, HTML markup like the following is inserted into your document:

Input (Submit)

500801b77565d40e3452eac3975e0858.gif

Inserts an input element of type="submit". To change the text that is displayed, edit the name property. By default, id="Submit1" is inserted for the first submit button, id="Submit2" for the second, and so on.

When you drag Input (Submit) onto the Design view surface, HTML markup like the following is inserted into your document:

Input (Text)

6ed3b2a77cb6ffeb77da75735e6c41ea.gif

Inserts an input element of type="text" in your document. To change the default text that is displayed, edit the value attribute. By default, id="Text1" is inserted for the first text field, id="Text2" for the second, and so on.

When you drag Input (Text) onto the Design view surface, HTML markup like the following is inserted into your document:

Important

It is recommended that you validate all user input. For more information, see Validating User Input in ASP.NET Web Pages.

Input (File)

17a0bb77c13444f98136a79c31004442.gif

Inserts an input element of type="file" in your document. By default, id="File1" is inserted for the first file field, id="File2" for the second, and so on.

When you drag Input (File) onto the Design view surface, HTML markup like the following is inserted into your document:

Important

It is recommended that you validate all user input. For more information, see Validating User Input in ASP.NET Web Pages.

Input (Password)

722424672ce04a130cad850226c95b36.gif

Inserts an input element of type="password". By default, id="Password1" is inserted for the first password field, id="Password2" for the second, and so on.

When you drag Input (Password) onto the Design view surface, HTML markup like the following is inserted into your document:

Important

If your application transmits user names and passwords, you should configure your Web site to use Secure Sockets Layer (SSL) to encrypt the transmission. For more information, see "Securing Connections with SSL" in the IIS Operations Guide. Additionally, it is recommended that you validate all user input. For more information, see Validating User Input in ASP.NET Web Pages.

Input (Check box)

de6cd4b7c7186541da923da2d9d9f697.gif

Inserts an input element of type="checkbox". To change the text that is displayed, edit the name property. By default, id="Checkbox1" is inserted for the first check box, id="Checkbox2" for the second, and so on.

When you drag Input (Check box) onto the Design view surface, HTML markup like the following is inserted into your document:

Input (Radio)

941a638abbbccdfd7aff10fad5dd42bd.gif

Inserts an input element of type="radio". To change the text that is displayed, edit the name property. By default, id="Radio1" is inserted for the first radio button, id="Radio2" for the second, and so on.

When you drag Input (Radio) onto the Design view surface, HTML markup like the following is inserted into your document:

Input (Hidden)

00b8f1d9a5de99c096d2a92f96dd2a28.gif

Inserts an input element of type="hidden". By default, id="Hidden1" is inserted for the first hidden field, id="Hidden2" for the second, and so on.

When you drag Input (Hidden) onto the Design view surface, HTML markup like the following is inserted into your document:

Textarea

7a74b3cd87e6c263ed49b77c8ef180e3.gif

Inserts a textarea element. You can resize the text area, or use its scroll bars to view text that extends beyond its display area. To change the default text that is displayed, edit the value attribute. By default, id="textarea1" is inserted the first text area, id=" textarea 2" for the second, and so on.

When you drag Textarea onto the Design view surface, HTML markup like the following is inserted into your document:

Important

It is recommended that you validate all user input. For more information, see Validating User Input in ASP.NET Web Pages.

Table

8a8bf6698e3552441db162b3b71e462c.gif

Inserts a table element.

When you drag Table onto the Design view surface, HTML markup like the following is inserted into your document:

Image

dee2bcb87bd77f60592c75992fcd56c8.gif

Inserts an img element. Edit this element to specify its src and its alt text.

When you drag Image onto the Design view surface, HTML markup like the following is inserted into your document:

Select

f1b94219c15b505a52db17aa9e9245f0.gif

Inserts a dropdown select element (without a size attribute). By default, id="select1" is inserted for the first list box, id="select2" for the second, and so on.

When you drag Select onto the Design view surface, HTML markup like the following is inserted into your document:

You can create a multi-line select element by increasing the value of the size property.

Horizontal Rule

cb7c9308384243b9737b67b65c2aeff6.gif

Inserts an hr element. To increase the thickness of the line, edit the size attribute.

When you drag Horizontal Rule onto the Design view surface, HTML markup like the following is inserted into your document:


Div

dbabab5bcabe03c3e210d9b80d5e6230.gif

Inserts a div element that includes an ms_positioning="FlowLayout" attribute. Except for the width and height, this item is identical to a Flow Layout Panel. To format the text that is contained within the div element, add a class="stylename" attribute to the opening tag.

When you drag Div onto the Design view surface, HTML markup like the following is inserted into your document:

Label

See Also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值