Valid XHTML 1.0 TransitionalTFW's Web Base / Javascript Samples: Misc Tricks

Page: [tfw/base/04_javascript/samples/01_misc_tricks.html] (v2015-08-15_01-40.victory_day)

  1. Self-exam:

    1. ../js/misc.js [View >>]

    2. javascript_function();

  2. Type judgment:

    1. function isArray(obj) {...}


    2. function isDom(obj) {...}


    3. function isDate(obj) {...}


    4. function isFunction(obj) {...}


    5. function isNumber(obj) {...}


    6. function isText(obj) {...}


    7. function isConstructedAsObject(obj) {...}


  3. Type convertion:

    1. function o2s(obj, strNullReplacement) {...}


    2. function o2i(obj, intReplacement) {...}


    3. function o2f(obj, intReplacement) {...}


  4. DOM value(s) and contents assignment:

    function fillElement(domElement, objContents) {...}























    Nothing.








  5. Text manipulation:

    1. calculateByteLength('');
          Return: (int)

    2. encodeURI_('');
          Return: (string)

    3. encodeURIComponent_('');
          Return: (string)

    4. escape_('');
          Return: (string)

    5. trim('');
          Return: (string)

    6. trimLeft('');
          Return: (string)

    7. trimRight('');
          Return: (string)