http://jsperf.com/in-array-vs-inarray-vs-indexof/5




http://hangaebal.blogspot.kr/2014/07/javascript-inarray-vs-inarray-vs-indexof.html


-----------------------------------------------

*JavaScript
var a = 3;
var b = 2;
var max;

max = a > b ?  a : b;              - 가능
a > b ? max = a : max = b;     - 가능
-----------------------------------------------
*Java
int a = 1;
int b = 2;
int max;

max = a > b ?  a : b;              - 가능
a > b ? max = a : max = b;     - 문법 오류 (x)

-----------------------------------------------







http://hangaebal.blogspot.kr/2014/06/java-javascript-difference-between-java.html

 JavaScript Object Length 구하기
getObjLength = function(obj) {
    var size = 0, key = null;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) size++;
    }
    return size;

};



출처 :
http://stackoverflow.com/questions/5223/length-of-javascript-object-ie-associative-array


http://hangaebal.blogspot.kr/2014/06/javascript-object-length.html

function gb_timeText(i) {

if (i < 10) i = '0' + i;

return i;

}


str.replace(/foo/g, "bar")

or

String.prototype.replaceAll = function(str1, str2, ignore) {
 return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,"$$$$"):str2);
}


http://hangaebal.blogspot.kr/2014/06/javascript-string-replaceall.html
http://stackoverflow.com/questions/2116558/fastest-method-to-replace-all-instances-of-a-character-in-a-string


'Blogger 이사' 카테고리의 다른 글

[Servlet] Servlet 구동 기본  (0) 2016.01.14
[JavaScript] '초' -> '시 분 초' 형태로  (0) 2016.01.14
[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[SQLite]Web SQL error handling  (0) 2016.01.14



db.
transaction(tx) {
doQuery(tx, "SELECT * FROM TABLE",[],theSuccessHandler)
});

function doQuery(tx, query, values, successHandler) {
tx.executeSql(query, values, successHandler, errorHandler);
function errorHandler(transaction, error) {
alert("Error : " + error.message + " in " + query);
}
}


http://hangaebal.blogspot.kr/2014/06/web-sql-error-handling.html

http://stackoverflow.com/questions/16559832/how-to-get-the-context-of-a-web-sql-error

'Blogger 이사' 카테고리의 다른 글

[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[JavaScript] String Object Methods  (0) 2016.01.14
[SQL] SQL get last row  (0) 2016.01.14
[JavaScript] key, value Array Sort  (0) 2016.01.14

concat()
- Joins two or more strings, and returns a copy of the joined strings

indexOf()
- Returns the position of the first found occurrence of a specified value in a string

replace()
- Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced

split()
- Splits a string into an array of substrings

substring()
- Extracts the characters from a string, between two specified indices

trim()
- Removes whitespace from both ends of a string



- Javascript String Method

- Javascript String Function

- Javascript 스트링 메소드


http://hangaebal.blogspot.kr/2014/06/javascript-string-object-methods.html
http://www.w3schools.com/jsref/jsref_obj_string.asp
http://icoon22.tistory.com/219

'Blogger 이사' 카테고리의 다른 글

[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[SQLite]Web SQL error handling  (0) 2016.01.14
[SQL] SQL get last row  (0) 2016.01.14
[JavaScript] key, value Array Sort  (0) 2016.01.14
[Javascript] key value Array  (0) 2016.01.14

var points = [40, 100, 1, 5, 25, 10];
points.sort(function(a, b){return b-a});


var status = new Array();
status.push({name: 'BOB', val: 10});
status.push({name: 'TOM', val: 3});
status.push({name: 'ROB', val: 22});
status.push({name: 'JON', val: 7});
status.sort(function(a,b) {
    return a.val - b.val;
});





http://hangaebal.blogspot.kr/2014/06/javascript-array-sort.html
http://www.w3schools.com/jsref/jsref_sort.asp
http://stackoverflow.com/questions/12788051/how-to-sort-an-associative-array-by-value

'Blogger 이사' 카테고리의 다른 글

[JavaScript] String Object Methods  (0) 2016.01.14
[SQL] SQL get last row  (0) 2016.01.14
[Javascript] key value Array  (0) 2016.01.14
[jQuery] jQuery 이벤트 호출  (0) 2016.01.14
[Javascript] window.load vs document.ready  (0) 2016.01.14

 There are two ways to add new properties to an object:

var obj = {
    key1: value1,
    key2: value2
};



Using dot notation:

obj.key3 = "value3";



Using square bracket notation:
obj["key3"] = "value3";






http://hangaebal.blogspot.kr/2014/06/javascript-key-value-array.html

http://stackoverflow.com/questions/1168807/how-can-i-add-a-key-value-pair-to-a-javascript-object-literal



'Blogger 이사' 카테고리의 다른 글

[SQL] SQL get last row  (0) 2016.01.14
[JavaScript] key, value Array Sort  (0) 2016.01.14
[jQuery] jQuery 이벤트 호출  (0) 2016.01.14
[Javascript] window.load vs document.ready  (0) 2016.01.14
[SQLite] Web SQL INSERT OR ...  (0) 2016.01.14


.trigger( eventType [, extraParameters ] );



- jQuery 이벤트 호출

- jQuery 이벤트 발생



http://hangaebal.blogspot.kr/2014/06/jquery-click.html


http://api.jquery.com/trigger/

'Blogger 이사' 카테고리의 다른 글

[JavaScript] key, value Array Sort  (0) 2016.01.14
[Javascript] key value Array  (0) 2016.01.14
[Javascript] window.load vs document.ready  (0) 2016.01.14
[SQLite] Web SQL INSERT OR ...  (0) 2016.01.14
[SQLite] Web SQL 여러줄 삽입  (0) 2016.01.14

+ Recent posts