分步表單如何實現 html_HTML表單入門的分步指南

分步表單如何實現 html

by Abhishek Jakhar

通過阿比舍克·賈卡(Abhishek Jakhar)

HTML表單入門的分步指南 (A step-by-step guide to getting started with HTML forms)

總覽 (Overview)

HTML forms are required when you want to collect some data from the person who visits your website. For example, when you register/login for applications like Uber, Netflix, or Facebook, you enter information like Name, Email, and Password through HTML forms.

當您想從訪問您的網站的人那里收集一些數據時,需要HTML表單。 例如,當您注冊/登錄Uber,Netflix或Facebook之類的應用程序時,您會通過HTML 表單輸入諸如NameEmailPassword之類的信息。

Now we will learn all the required elements for creating a form.

現在,我們將學習創建表單的所有必需元素。

NOTE: I have already added the Styling using CSS and so my elements will look different, but they will work in exactly the same way.

注意:我已經使用CSS添加了樣式,因此我的元素看起來會有所不同,但是它們的工作方式完全相同。

If you want to make your elements look like mine then, you can find my CSS file in the links given below:

如果要使您的元素看起來像我的元素,則可以在下面給出的鏈接中找到我CSS文件:

Custom CSS: https://gist.github.com/abhishekjakhar/493d920a219ed9d88f1846cd31de7751

自定義CSS: https : //gist.github.com/abhishekjakhar/493d920a219ed9d88f1846cd31de7751

Normalize CSS:

標準化CSS:

Normalize CSS:https://gist.github.com/abhishekjakhar/3a6c25fa61a293b6a56d28f98497808b

標準化CSS: https : //gist.github.com/abhishekjakhar/3a6c25fa61a293b6a56d28f98497808b

表單元素 (Form Element)

This is the first element which we will learn. This element wraps all the other elements that go inside of our form. This is the form element.

這是我們將要學習的第一個要素。 該元素包裝了表單中所有其他元素。 這是表單元素。

Our form won’t submit the data anywhere because it is not connected to a server. To connect our form to a server and process our data, we can use any server-side language like Node, Python, Ruby, or PHP. The part of processing the data involves two important attributes that are attached to the form element. Let’s take a look at those attributes.

我們的表單不會在任何地方提交數據,因為它沒有連接到服務器。 要將表單連接到服務器并處理數據,我們可以使用任何服務器端語言,例如Node,Python,Ruby或PHP。 處理數據的部分涉及到附加到form元素的兩個重要屬性。 讓我們看一下這些屬性。

Attributes:

屬性:

  1. action: The action attribute is the web address (URL) of a program that processes the information submitted by our form.

    action: action屬性是處理我們表單提交的信息的程序的網址(URL)。

  2. method: It is the HTTP method that the browser uses to submit the form, the possible values are POST and GET.

    method:這是瀏覽器用來提交表單的HTTP方法 ,可能的值為POSTGET。

  • POST — Data from the body of the form is sent to the server.

    POST —表單主體中的數據發送到服務器。

  • GET — Data is sent inside of the URL and parameters are separated with a question mark.

    GET-數據在URL內發送,參數之間用問號分隔。

Note: You cannot have forms nested inside another form. That means you cannot have a <form> element inside another<form> element.

注意: 表單不能嵌套在另一個表單中 。 這意味著您不能在另一個<form>元素內包含<form>元素。

輸入元素 (Input Element)

The input element is the most commonly used form element. It is used to make a text field where the user can type some information for example email, password etc.

輸入元素是最常用的表單元素。 它用于創建一個文本字段 ,用戶可以在其中輸入一些信息 ,例如電子郵件密碼等。

Let’s make a text field where the user can type in their name.

讓我們創建一個文本字段,用戶可以在其中輸入他們的姓名。

Note: The input element is a self-closing tag, so there’s no need to type a closing tag to match the opening tag.

注意: input元素是一個自動關閉標簽,因此無需鍵入關閉標簽以匹配開始標簽。

I have added three attributes in the above input tag. Let’s take a look at each one in detail.

我在上面的輸入標簽中添加了三個屬性。 讓我們詳細看一下每個。

type

類型

The type attribute indicates what kind of input we want. If we give a value of text to the type attribute, than what we mean here is that the value which we are entering into the input field is of type text. There are many possible values for this particular attribute. Some possible values are email, tel for telephone and password etc.

type屬性指示我們想要哪種輸入。 如果我們給type屬性提供一個text值,那么在這里我們要輸入的值就是text類型。 此特定屬性有許多可能的值。 一些可能的值是電子郵件,電話的tel和密碼等。

Example: When you login into any of your accounts (Amazon/Netflix), you need to enter two things: email and password. So in this particular case the input element is used. The type attribute is given with the value of email and password respectively.

示例:登錄到任何帳戶(Amazon / Netflix)時,您需要輸入兩件事: emailpassword 。 因此,在這種特殊情況下,將使用輸入元素。 type屬性分別帶有emailpassword的值。

id

ID

The ID attribute is not mandatory, but it’s a good idea to add one. In some cases, this is helpful for targeting elements with CSS/JavaScript. The ID attribute is added so that we can associate labels to specific form controls.

ID屬性不是必需的,但最好添加一個。 在某些情況下,這對于使用CSS / JavaScript定位元素很有幫助。 添加了ID屬性,以便我們可以將標簽關聯到特定的表單控件

name

名稱

The name attribute is necessary. When a form is submitted to the server side code, the server can understand the form data and process the values appropriately.

名稱屬性是必需的。 將表單提交到服務器端代碼后,服務器可以理解表單數據并適當地處理值。

placeholder

占位符

It is a short hint which is displayed in the input field before the user enters a value. As the user starts typing in the input field the placeholder disappears.

這是一個簡短的提示,在用戶輸入值之前顯示在輸入字段中。 用戶開始在輸入字段中輸入時,占位符消失。

Let’s see what a few other basic input elements look like.

讓我們看看其他一些基本輸入元素的外觀。

Note: Using different values for the type attribute will produce different results. For example you can make input be of type email, text, or password etc. All of them show slightly different behaviour, which you will see below.

注意:type屬性使用不同的值將產生不同的結果。 例如,您可以使輸入的類型為電子郵件,文本或密碼等。所有這些都顯示出稍有不同的行為,您將在下面看到。

Multiple Input Elements (Text, Email, Password)

多個輸入元素(文本,電子郵件,密碼)

Multiple Input Element (Text, Email, Password)

多個輸入元素(文本,電子郵件,密碼)

Textarea元素 (Textarea Element)

Sometimes a single line of text is not enough and a simple input element won’t work. For example, some websites have a contact form for people to type their queries or messages. In these cases, it’s best to use the textarea element.

有時單行文本是不夠的,簡單的輸入元素將無法工作。 例如,某些網站具有供人們鍵入其查詢或消息的聯系表。 在這種情況下,最好使用textarea元素。

The <textarea> is not a self-closing tag, so we need to type both the opening and the closing tag. (<textarea></textarea>)

<textar ea>不是自動關閉標簽,因此我們需要同時輸入開始標簽和結束標簽。 (<textarea> </ textarea>)

Attributes:

屬性:

  • id: Same as mentioned above in <input/> element.

    id:與上面<input />元素中提到的相同。

  • name: Same as mentioned above in <input/> element.

    名稱:與上面<input />元素中提到的相同。

  • cols: Specifies the visible width of a text area.

    cols:指定文本區域的可見寬度。

  • rows: Specifies the visible number of lines in a text area.

    行:指定文本區域中可見的行數。

You can see that the textarea allows us to type in multiple lines. A textarea is resizable by the user, you can see in the above illustration that I am resizing the textarea.

您會看到textarea允許我們鍵入多行。 用戶可以調整文本區域的大小,在上圖中可以看到我正在調整文本區域的大小。

Note: In most browsers the textarea element is resizable.

注意:在大多數瀏覽器中, textarea元素是可調整大小的。

按鈕元素 (Button Element)

The button element is one of the most important form elements. Without a button you cannot submit any form to the server for processing.

button元素是最重要的表單元素之一。 沒有按鈕,您將無法將任何表單提交到服務器進行處理。

The button element accepts the attribute called type. This attribute accepts three values submit, reset and button.

button元素接受稱為type的屬性 該屬性接受三個值SubmitResetButton

Attributes:

屬性:

  • type=”reset”: It will clear all the form data when it’s clicked.

    type =“ reset”:單擊后將清除 所有表單數據

  • type=”button”: It does not have any default behavior and it’s mostly used with JavaScript to program it for custom behavior.

    type =“ button”:它沒有任何默認行為,并且通常與JavaScript結合使用以對其進行自定義行為編程。

  • type=”submit”: The default behavior of the submit type is, as the name implies, submit the form and send all the data over to the server.

    type =“ submit”:顧名思義,submit 類型的默認行為是提交表單并將所有數據發送到服務器。

標簽元素 (Label Element)

Right now it’s impossible for the user to tell which form control does what. There’s no way to know where you will be entering the email and where you will be entering the password. The form looks very incomplete and messy.

現在,用戶無法知道哪個表單控件執行什么操作。 無法知道您將在哪里輸入電子郵件以及您將在哪里輸入密碼。 表格看起來非常不完整和混亂。

We can label each one of our forms controls using the label element.

我們可以使用label元素來標記我們每個窗體控件。

The most used attribute with a label is for.

標簽的最常用屬性是for。

Attributes:

屬性:

  • for: The for attribute associates the label with a particular form element. The way it matches is by ID. As you can see in the above example the value of the ID attribute given to the input element is email. The value of the for attribute given to the label element is also email, so both of them are associated with each other.

    for: for屬性將標簽與特定表單元素相關聯。 匹配的方式是通過ID 。 如您在上面的示例中所見,給輸入元素提供的ID屬性的email。 賦予label元素的for屬性的值也是email,因此它們彼此關聯。

Note: When we click on the label, we automatically get the focus to the input field which is associated with the label. This is a default behaviour.

注意:單擊標簽時,我們會自動將焦點移到與標簽關聯的輸入字段。 這是默認行為。

Now our form looks very good ?.

現在我們的表格看起來非常好嗎?

選擇菜單 (Select Menus)

Sometimes, when you’re creating a form, you don’t want the user to be able to type in the text. Rather, you might want them to pick from some preset options that you provide.

有時,當您創建表單時,您不希望用戶能夠輸入文本。 相反,您可能希望他們從您提供的一些預設選項中進行選擇

Anytime you have a list of options that’s longer than, say, four or five things, it’s best to go with the select menu because it saves space.

任何時候您擁有的選項列表都比四,五種東西長,最好選擇選擇菜單,因為它可以節省空間。

Let’s say that our form is targeted for students who are going to seek admission at a university. We want to allow students to select from a predefined list of university programs.

假設我們的表格是針對打算在大學錄取的學生的。 我們希望允許學生從大學課程的預定義列表中進行選擇。

The select menu element is made using opening and closing <select> tag.

選擇菜單元素是使用打開和關閉<sele ct>標簽制成的。

<select> — The select element renders a drop-down menu that contains selectable options. The select element won’t do anything, by itself. This form element actually needs additional elements inside of it, exactly like <ul> elements needs <li> elements. The elements we put inside of select element are called option elements.

<sele ct>-選擇元素顯示一個包含可選選項的下拉菜單 選擇元素不會做任何事情,本身。 這種形式的元素實際上需要在它的內部的附加元件,恰好LIK?<UL> ELE 換貨的需求<LI>元素。 我們把選擇e 字元素內的元素被稱為選項元素。

Attributes:

屬性:

  • name: Same as mentioned above in <input/> element.

    名稱:與上面<input />元素中提到的相同。

<option> — The option element represents one of the choices that a user can choose in a select menu. The &lt;option> element uses an attribute called value.

<opti on>-選項元素表示用戶可以在選擇菜單中選擇的選項之一 &l t; option>元素使用 屬性值。

Attributes:

屬性:

  • value: When you submit a form to server-side code, each form element has an associated value for text inputs and text areas. That value is whatever the user types into the field. However, since we’re creating these predefined options, we need to specify what the value should look like when it’s submitted. So, we use the value attribute to specify the values to predefined options.

    值:當您向服務器端代碼提交表單時,每個表單元素對于文本輸入和文本區域都有一個關聯的值。 該值是用戶在字段中鍵入的任何值。 但是,由于我們正在創建這些預定義的選項,因此我們需要指定該值在提交時的外觀。 因此,我們使用value屬性為預定義選項指定值。

Now we have Select Courses label with the select menu which we have just created. Now, we can also organize our list into logical groups with the <optgroup> element.

現在,我們有了剛剛創建的帶有選擇菜單的“選擇課程”標簽。 現在,我們還可以使用<optgro up>元素將列表組織成邏輯組。

Attributes:

屬性:

  • label: The name of the group of options. In the example given below our list of options has been divided into two groups with the label of Engineering and Management.

    標簽:選項組的名稱。 在下面給出的示例中,我們的選項列表已分為兩組,標簽為Engineering and Management。

In the example given below

在下面的示例中

單選按鈕 (Radio Buttons)

Select menus are great if you have lots of options. If you have something like 5 or fewer options, it’s better to use radio buttons.

如果您有很多選擇,那么選擇菜單會很棒。 如果您有5種或更少的選項,則最好使用單選按鈕。

The difference between Select Menu and Radio Button is that radio buttons show you all the options at once. Like the select menu the user can only pick from one of them.

選擇菜單和單選按鈕之間的區別在于單選按鈕可一次顯示所有選項。 像選擇菜單一樣,用戶只能從其中之一中進行選擇。

Attributes:

屬性:

  • name: Same as mentioned above in <input/> element.

    名稱:與上面<input />元素中提到的相同。

  • value: Since we’re creating these predefined options, we need to specify what the value should look like when it’s submitted. So, we use the value attribute to specify the values to predefined options.

    值:由于我們正在創建這些預定義的選項,因此我們需要指定該值在提交時的外觀。 因此,我們使用value屬性為預定義選項指定值。

Note: If you select one option and then you try to select another option, you’ll see that it deselects the previous option. The way that it knows to do that is because we have the name attribute exactly same. So it knows that these two radio buttons are part of the same group.

注意: 如果選擇一個選項,然后嘗試選擇另一個選項,則會看到它取消選擇了上一個選項。 它知道這樣做的方式是因為我們擁有完全相同的name屬性。 因此,它知道這兩個單選按鈕是同一組的一部分。

Note: Name should be the same if we want radio buttons to be a part of the same radio button group.

注意:如果我們希望單選按鈕成為同一個單選按鈕組的一部分,則名稱應相同。

選框 (Checkboxes)

Sometimes you might have a group of predefined options. You want the user to be able to select multiple options and not just one of them. That’s where checkboxes are useful.

有時您可能有一組預定義的選項。 您希望用戶能夠選擇多個選項,而不僅僅是其中之一。 這就是復選框有用的地方。

Attributes:

屬性:

  • name: Same as mentioned above in <input/> element.

    名稱:與上面<input />元素中提到的相同。

  • value: Since we’re creating these predefined options, we need to specify what the value should look like when it’s submitted. So, we use the value attribute to specify the values to predefined options.

    值:由于我們正在創建這些預定義的選項,因此我們需要指定該值在提交時的外觀。 因此,我們使用value屬性為預定義選項指定值。

  • checked: By default, a checkbox input is unchecked. You can set the default state to checked by using the attribute called checked. Remember this is a boolean attribute.

    選中:默認情況下,未選中復選框輸入。 您可以通過使用稱為checked的屬性將默認狀態設置為checked 。 請記住,這是一個布爾屬性。

<input type="checkbox" checked id="name" value="abhishek" name="user_name" />

In the example given below, I have used the label for each individual option. I have connected the checkbox and a label using the for attribute of label and id attribute of the checkbox.

在下面給出的示例中,我為每個選項使用了標簽。 我已連接的復選框 ,并使用 復選框標簽id屬性的屬性標簽

Note: It can be hard to click a small checkbox. It is recommended to wrap a <label> element around the checkbox. If we click the label then also our checkbox gets checked or unchecked. I have not done it below, but you can do it to make the UX better.

注意: 很難單擊一個小復選框。 建議在復選框周圍包裹一個<label>元素。 如果單擊標簽,則我們的復選框也會被選中或未選中。 我下面沒有做過,但是您可以做得更好,以達到UX更好的效果

復選框和單選按鈕之間的區別 (Difference between Checkbox and Radio button)

  1. Checkbox can exist on its own, while radio buttons can only appear as a group (minimum of 2 radio buttons should be there).

    復選框可以存在于它自己的 ,而單選按鈕只能出現作為一個 (2個的單選按鈕最低也要在那里)。

  2. Selecting checkbox is optional but choosing one of the radio button is mandatory.

    選擇復選框是可選的 ,但選擇的單選按鈕的一個是強制性的

完整表格 (The Complete Form)

We’ve learned about lots of HTML form elements and have covered the essentials.

我們已經了解了許多HTML表單元素,并涵蓋了所有要點。

Don’t worry about memorizing everything. Almost no professional web developer can name every attribute or element. What’s more important than memorization is learning how to look up things in the documentation when you need them.

不必擔心記住所有內容。 幾乎沒有專業的Web開發人員可以命名每個屬性或元素。 比記憶更重要的是,學習如何在需要時在文檔中查找內容。

You can try adding your own CSS to make this form look the way you want it to look.

您可以嘗試添加自己CSS,以使此表單看起來像您想要的樣子。

You can learn more about forms in the link given below

您可以在下面的鏈接中了解有關表格的更多信息

HTML formsThis module provides a series of articles that will help you master HTML forms. HTML forms are a very powerful tool for…developer.mozilla.org

HTML表單 此模塊提供了一系列文章,可幫助您掌握HTML表單。 HTML表單對于... developer.mozilla.org 是一個非常強大的工具。

I hope you’ve found this post informative and helpful. I would love to hear your feedback!

希望您發現這篇文章對您有幫助。 我希望聽到您的反饋!

Thank you for reading!

感謝您的閱讀!

翻譯自: https://www.freecodecamp.org/news/a-step-by-step-guide-to-getting-started-with-html-forms-7f77ae4522b5/

分步表單如何實現 html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/393049.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/393049.shtml
英文地址,請注明出處:http://en.pswp.cn/news/393049.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

linux網絡服務偶爾失效,判斷linux下的網絡服務是否正常啟動

# 自動判斷samba,http,named,dovecot,tomcat等服務是否正常啟動##作者&#xff1a;胡昌文#時間&#xff1a;2008-09-28#MSN&#xff1a;[email]hucw_rhcehotmail.com[/email]###!/bin/shSAMBA1netstat -nutlp | grep :137 | grep smbdSAMBA2netstat -nutlp | grep :138 | grep …

leetcode809. 情感豐富的文字

有時候人們會用重復寫一些字母來表示額外的感受&#xff0c;比如 “hello” -> “heeellooo”, “hi” -> “hiii”。我們將相鄰字母都相同的一串字符定義為相同字母組&#xff0c;例如&#xff1a;“h”, “eee”, “ll”, “ooo”。 對于一個給定的字符串 S &#xff…

NeHe OpenGL教程 第三十課:碰撞檢測

轉自【翻譯】NeHe OpenGL 教程 前言 聲明&#xff0c;此 NeHe OpenGL教程系列文章由51博客yarin翻譯&#xff08;2010-08-19&#xff09;&#xff0c;本博客為轉載并稍加整理與修改。對NeHe的OpenGL管線教程的編寫&#xff0c;以及yarn的翻譯整理表示感謝。 NeHe OpenGL第三十課…

andorid手機電腦操作

之前一直使用androidscreencast在pc上對手機進行操作,好久都沒用了,前些天再次用的時候,提演示樣例如以下: 決定還是自己寫一個吧,由于7月份要做一個小分享,打算講一些android的東西,須要在電腦上顯示手機這邊的畫面,提供一定的操作. 花了一點時間做好了,給大家截一個圖,代碼放…

struct.error: cannot convert argument to integer解決辦法

更新Python包轉載于:https://www.cnblogs.com/long5683/p/11086768.html

sphinx_Sphinx之謎:如何輕松地編寫代碼

sphinx為什么我在這里&#xff1f; (Why Am I Here?) You, the reader, are here because you wrote some awesome tool in Python, and you want to make it accessible and easy to use.讀者之所以在這里&#xff0c;是因為您使用Python編寫了一些很棒的工具&#xff0c;并且…

linux貪吃蛇c程序,Linux環境下C語言實現貪吃蛇游戲

Linux環境下C語言實現貪吃蛇游戲[liultest snake]$ more snake.c#include #include #include #include #include #define NUM 60struct direct //用來表示方向的{int cx;int cy;};typedef struct node //鏈表的結點{int cx;int cy;struct node *back;struct node *next;}node;v…

Java正則表達式的使用和詳解(上)

1.匹配驗證-驗證Email是否正確 public static void main(String[] args) {// 要驗證的字符串String str "servicexsoftlab.net";// 郵箱驗證規則String regEx "[a-zA-Z_]{1,}[0-9]{0,}(([a-zA-z0-9]-*){1,}\\.){1,3}[a-zA-z\\-]{1,}";// 編譯正則表達式P…

在組策略中使用腳本為域用戶添加網絡打印機

使用腳本為用戶添加網絡打印機 如果你想讓培訓部門的用戶登錄后就能添加網絡打印機&#xff0c;就可以使用登錄腳本來實現。其中DCServer是域控制&#xff0c;MarketPC1是市場部門的計算機&#xff0c;韓立輝用戶是培訓部門的用戶。下面就驗證使用組策略為培訓部門的用戶添加網…

leetcode257. 二叉樹的所有路徑(回溯算法)

給定一個二叉樹&#xff0c;返回所有從根節點到葉子節點的路徑。 說明: 葉子節點是指沒有子節點的節點。 示例: 輸入: 1 / 2 3 5 輸出: [“1->2->5”, “1->3”] 解釋: 所有根節點到葉子節點的路徑為: 1->2->5, 1->3 代碼 /*** Definition for a b…

英特爾神經計算棒_如何設置英特爾Movidius神經計算棒

英特爾神經計算棒by Rishal Hurbans由Rishal Hurbans 如何設置英特爾Movidius神經計算棒 (How to set up the Intel Movidius Neural Compute Stick) In 2017 I was approached by Intel to join their Innovator Programme. After a couple interviews I was inducted as an …

linux 腳本中的push,linux shell之pushd、popd和dirs的使用講解

1 問題我們有時候需要保存多個路徑&#xff0c;上下鍵切換不方便&#xff0c;用cd-只能到上個目錄&#xff0c;我們可以用dirs和pushd和popd2 dirs、pushd、popddirs: 這個命令顯示棧里面所有的路徑&#xff0c;一定會包含當前路徑,常用參數如下dirs -v 顯示棧里面的所有路徑和…

為什么我從 Git Flow 開發模式切換到了 Trunk Based 開發模式?

我已經使用 Git Flow 構建我的 Git 分支有幾年了。但是&#xff0c;我遇到了 Git Flow 的一些問題&#xff0c;其中大部分來自長期存在的分支。解決這些問題的方案就是 Trunk Based Development。這是一個非常簡單的技術&#xff0c;也是有效的持續交付的基礎。在這篇文章中&am…

DedeCMS 提示信息! ----------dede_addonarticle

把數據保存到數據庫附加表 dede_addonarticle 時出錯&#xff0c;請把相關信息提交給DedeCms官方。Duplicate entry ’2532′ for key ‘PRIMARY’出現這種情況其實是你的主鍵是不可重復的&#xff0c;現在重復插入值為2532的主鍵了。可以去掉主鍵唯一&#xff0c;或是設成自增…

angular 模塊構建_通過構建全棧應用程序學習Angular 6

angular 模塊構建Angular 6 is out! The new features include better performance, new powerful CLI additions and a new way to inject services.Angular 6出來了&#xff01; 新功能包括更好的性能&#xff0c;新的功能強大的CLI附加功能以及注入服務的新方法。 This tut…

leetcode74. 搜索二維矩陣(二分查找)

編寫一個高效的算法來判斷 m x n 矩陣中&#xff0c;是否存在一個目標值。該矩陣具有如下特性&#xff1a; 每行中的整數從左到右按升序排列。 每行的第一個整數大于前一行的最后一個整數。 示例 1: 輸入: matrix [ [1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 50] ] tar…

搭建基于.NetFrameWork的私有nuget服務端及打包項目發布上傳

一、私有Nuget服務端搭建 1.創建一個.NetFramework web項目 2.在nuget管理中 安裝 nuget.server包 3.安裝完成后修改web.config里面的 apikey 和 packagesPath apikey&#xff1a;推送包到nuget服務端 packpage: 上傳上來的包存放的服務器位置 4.發布web項目到IIS中&#xff0c…

linux 網絡配置 阮一峰,Vim 配置入門

Vim 是最重要的編輯器之一&#xff0c;主要有下面幾個優點。可以不使用鼠標&#xff0c;完全用鍵盤操作。系統資源占用小&#xff0c;打開大文件毫無壓力。鍵盤命令變成肌肉記憶以后&#xff0c;操作速度極快。服務器默認都安裝 Vi 或 Vim。Vim 的配置不太容易&#xff0c;它有…

spring 之 property-placeholder 分析

不難知道&#xff0c; property-placeholder 的解析是 PropertyPlaceholderBeanDefinitionParser 完成的&#xff0c; 但是 它僅僅是個parser &#xff0c; 它僅僅是讀取了 location 等配置屬性&#xff0c; 并沒有完成真正的解析&#xff0c;及 注冊。 <context:property-p…

leetcode面試題 10.02. 變位詞組

編寫一種方法&#xff0c;對字符串數組進行排序&#xff0c;將所有變位詞組合在一起。變位詞是指字母相同&#xff0c;但排列不同的字符串。 注意&#xff1a;本題相對原題稍作修改 示例: 輸入: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], 輸出: [ [“ate”,…