⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 javasrcipt编写的Ajax的类库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
									</a></div>
<div class="mDesc">Opposite of server.URLEncode</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_4IDAGMJ0">If you store a variable in the queryString then the variables input will be automatically
encoded. Sometimes you need a function to decode this %20%2H, etc.<br><br><div><strong> endcodedText</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: your string which should be decoded. e.g: Haxn%20Text (%20 = Space)</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											decoded string</div>
</div>
</td>
</tr>
</table>
</fieldset><br><br><a name="class_5"></a><fieldset class="class">
<legend>
						Class StringOperations <a class="notForPrint" href="#top" style="text-decoration:none;">^</a></legend>
<div class="cDescription">Collection of various useful string operations. An instance of this class
called "str" is created when loading the page. Thus all methods can easily be
accessed using str.methodName.</div>
<table cellspacing="0" cellpadding="3" border="0">
<tr>
<td class="label">Version:</td>
<td>1.1</td>
</tr>
<tr>
<td class="label">Author:</td>
<td>Michal Gabrukiewicz - gabru @ grafix.at, Michael Rebec on 11.12.2003</td>
</tr>
<tr>
<td class="label">Last modified:</td>
<td>09.07.2007 22:53:30</td>
</tr>
<tr>
<td class="label">Static:</td>
<td>str</td>
</tr>
<tr>
<td class="label">Path:</td>
<td>/ajaxed/class_stringOperations/stringOperations.asp</td>
</tr>
</table>
<h2><span onclick="toggle('props_5')" style="cursor:pointer">Properties</span> <a href="#class_5" class="notForPrint" style="text-decoration:none;">^</a></h2>
<table id="props_5" style="display:none" class="table alwaysPrint" cellspacing="0" cellpadding="3" border="0">
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</table>
<h2><span onclick="toggle('meths_5')" style="cursor:pointer">Methods</span> <a href="#class_5" class="notForPrint" style="text-decoration:none;">^</a></h2>
<table id="meths_5" class="table alwaysPrint" style="display:none" cellpadding="3" cellspacing="0" border="0">
<tr>
<td>
<div class="mName"><a href="#method_IDATDK0" style="text-decoration:none">[end]
										(
										 
										)
									</a></div>
<div class="mDesc">stops to response</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDATDK0">
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAKKK0" onclick="toggle('mdetails_5IDAKKK0')">arrayToString
										(
										 arr seperator 
										)
									</a></div>
<div class="mDesc">Converts an array to a string</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAKKK0"><br><div><strong>byVal arr</strong>
												: </div>
<div><strong> seperator</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: seperator between the array-fields</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											concated array</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAHXK0" onclick="toggle('mdetails_5IDAHXK0')">ASCIICode
										(
										 str 
										)
									</a></div>
<div class="mDesc">Encodes a string into ASCII Characters</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAHXK0">This function takes a string (for example an email-address) and converts it to
standardized ASCII Character codes, thus blocking bots/spiders from reading your
email address, while yet allowing visitors to continue to read and use your proper
address via mailto links, etc.<br><br><div><strong>byVal str</strong>
												: </div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											the ASCII Encoded String</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDALVK0" onclick="toggle('mdetails_5IDALVK0')">capitalize
										(
										 inputStr 
										)
									</a></div>
<div class="mDesc">Makes every first letter of every word to upper-case.</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDALVK0">Good for Names or cities. Example: "axel schweis" will result in "Axel Schweis"<br><br><div><strong> inputStr</strong>
												: </div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											changed string</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAZQJ0" onclick="toggle('mdetails_5IDAZQJ0')">change
										(
										 source find replaceWith 
										)
									</a></div>
<div class="mDesc">an extension of the common replace() function. basically the same
but you can replace more parts in one go.</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAZQJ0">find (array) -&gt; replaceWith (string): every match of 'find' will be replaced with the string
find (array[n]) -&gt; replaceWith (array[n]): must be same size! every field will be replaced by the field
of replaceWith with the same index.
find (array[n]) -&gt; replaceWith (array[m]): n &gt; m! for the missing fields the last one will be taken
for replacement. e.g. find  = array(1, 2), replaceWith = array(3) means that the 1 will be replaced with
3 and the 2 will also be replaced with 3 because there is no equivalent for the 2<br><br><div><strong>byVal source</strong>
												: </div>
<div><strong> find</strong><span class="type">
													(
														<span class="type">string</span> <span class="type">array</span> 
													)
													</span>
												: what you are looking for.</div>
<div><strong> replaceWith</strong><span class="type">
													(
														<span class="type">string</span> <span class="type">array</span> 
													)
													</span>
												: the value you want to replace the matches with.</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											the replaced source string</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAEPK0" onclick="toggle('mdetails_5IDAEPK0')">clone
										(
										 str n 
										)
									</a></div>
<div class="mDesc">Concats a string "n" times</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAEPK0"><br><div><strong>byVal str</strong>
												: </div>
<div><strong> n</strong><span class="type">
													(
														<span class="type">int</span> 
													)
													</span>
												: the number of concats</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											the concated string</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAA0J0" onclick="toggle('mdetails_5IDAA0J0')">defuseHTML
										(
										 value 
										)
									</a></div>
<div class="mDesc">defuses the HTML of  given string. so html code wont be recognized as HTML code by browser</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAA0J0"><br><div><strong> value</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: the value which should be defused</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											defused value</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAPCK0" onclick="toggle('mdetails_5IDAPCK0')">divide
										(
										 inputStr partitionLength 
										)
									</a></div>
<div class="mDesc">divides a string into several string-paritions of a given length</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAPCK0">string "HAXN" will result (partitionlength=2) in the following array:
a(0) = "HA"; a(1) = "XN"<br><br><div><strong> inputStr</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: string which should be divided</div>
<div><strong>byVal partitionLength</strong>
												: </div>
<div><strong>Return </strong>
											(
											<span class="type">array</span> 
											) :
											array with all partitions</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAAOK0" onclick="toggle('mdetails_5IDAAOK0')">endsWith
										(
										 str chars 
										)
									</a></div>
<div class="mDesc">Checks if the string ends with ...</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAAOK0"><br><div><strong>byVal str</strong>
												: </div>
<div><strong> chars</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: the compare char/string</div>
<div><strong>Return </strong>
											(
											<span class="type">bool</span> 
											) :
											true if the two strings are equal</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDA5GK0" onclick="toggle('mdetails_5IDA5GK0')">ensureSlash
										(
										 pathString 
										)
									</a></div>
<div class="mDesc">adds a slash "/" at the end of the string if there isnt one.</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDA5GK0">Good use for urls or paths if you want to be sure that there is a slash at the end
of an url or a path.<br><br><div><strong> pathString</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: The string (url, path) you want to check</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											the new url. with a slash at the end.</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDALSJ0" onclick="toggle('mdetails_5IDALSJ0')">existsIn
										(
										 aString anArray caseSensitive 
										)
									</a></div>
<div class="mDesc">checks if a given string can be found in a given array</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDALSJ0">all values in the array are treated as strings when comparing<br><br><div><strong>byVal aString</strong>
												: </div>
<div><strong>byVal anArray</strong>
												: </div>
<div><strong> caseSensitive</strong><span class="type">
													(
														<span class="type">bool</span> 
													)
													</span>
												: should the search be case sensitive?</div>
<div><strong>Return </strong>
											(
											<span class="type">int</span> 
											) :
											index of the first found field within the array. -1 if not found</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDADWK0" onclick="toggle('mdetails_5IDADWK0')">format
										(
										 str arr 
										)
									</a></div>
<div class="mDesc">Replaces all {n} values in a given string through the n-index field of an array.</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDADWK0">Its just like the string.format method in .NET. so if you provide "my Name is {0}" as
your input then the {0} will be replaced by the first field of your array. and so on.<br><br><div><strong>byVal str</strong>
												: </div>
<div><strong> arr</strong><span class="type">
													(
														<span class="type">array</span> 
													)
													</span>
												: the array with your values</div>
<div><strong>Return </strong>
											(
											<span class="type">string</span> 
											) :
											changed string</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAO2J0" onclick="toggle('mdetails_5IDAO2J0')">getHiddenInput
										(
										 name value 
										)
									</a></div>
<div class="mDesc">generates a hidden input field and returns the HTML for it</div>
<div style="display:none" class="mdetails alwaysPrint" id="mdetails_5IDAO2J0"><br><div><strong> name</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: the name of the value</div>
<div><strong> value</strong><span class="type">
													(
														<span class="type">string</span> 
													)
													</span>
												: the value it should hold</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="mName"><a href="#method_IDAM4J0" onclick="toggle('mdetails_5IDAM4J0')">HTMLEncode

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -