Search

4/15/2010

yui connect


// If the specified HTTP method is GET, setForm() will return an
// encoded string that is concatenated to the uri to
// create a querystring.
if(method.toUpperCase() == 'GET'){
if(this._sFormData.length !== 0){
// If the URI already contains a querystring, append an ampersand
// and then concatenate _sFormData to the URI.
uri += ((uri.indexOf('?') == -1)?'?':'&') + this._sFormData;
}
}
else if(method.toUpperCase() == 'POST'){
// If POST data exist in addition to the HTML form data,
// it will be concatenated to the form data.
postData = postData?this._sFormData + "&" + postData:this._sFormData;
}

沒有留言: