Das beste jQuery EasyUI Form - Erstellen Sie einen Baum Dropdown-Feld (ComboTree)-Tutorial im Jahr 2024. In diesem Tutorial können Sie Download von jQuery EasyUI Beispiele, lernen

jQuery EasyUI Form - Erstellen Sie einen Baum Dropdown-Feld (ComboTree)

Baum Dropdown-Feld (ComboTree) ist ein Dropdown-Feld unter dem Baum (Baum) mit dem (ComboBox). Es kann als ein Formularfeld Verwendung handeln, kann es zu einem Remote-Server übermittelt werden.

In diesem Tutorial werden wir ein Anmeldeformular mit Namen, Adresse, Stadt Felder erstellen. Stadtfeld ist ein Dropdown-Feld Baum (ComboTree) Feld, in dem der Benutzer die Verzeichnisstruktur Dropdown können (Baum Panel), und eine bestimmte Stadt wählen.

Erstellen Sie ein Formular (Form)

	<Div id = "dlg" class = "easyui-Dialog" style = "width: 500px; height: 250px; padding: 10px 30px;"
			title = "Register" Tasten = "# dlg-Tasten">
		<H2> Kontoinformationen </ h2>
		<Form id = "ff" method = "post">
			<Table>
				<Tr>
					<Td> Name: </ td>
					<Td> <input type = "text" name = "name" style = "width: 350px;" /> </ td>
				</ Tr>
				<Tr>
					<Td> Adresse: </ td>
					<Td> <input type = "text" name = "Adresse" style = "width: 350px;" /> </ td>
				</ Tr>
				<Tr>
					<Td> Ort: </ td>
					<Td> <select class = "easyui-combotree" url = "data / city_data.json" name = "Stadt" style = "width: 156px;" /> </ td>
				</ Tr>
			</ Table>
		</ Form>
	</ Div>
	<Div id = "dlg-Tasten">
		<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="savereg()"> Senden </a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')"> </a> Abbrechen
	</ Div>

Sie können aus dem obigen Code sehen wir eine "Stadt" Baum Dropdown-Feld (ComboTree) genannt Baum (Baum) Daten aus dem Remote-Server kann ein URL Attributfeld, dieses Feld einrichten abgerufen. Bitte beachten Sie, dass dieses Feld einen Stil "easyui-combotree" genannt hat, so dass wir brauchen keine js Codebaum Dropdown-Feld (ComboTree) Felder zu schreiben, werden automatisch wiedergegeben.

Download von jQuery EasyUI Beispiele

jeasyui-form-form2.zip

jQuery EasyUI Form - Erstellen Sie einen Baum Dropdown-Feld (ComboTree)
10/30