India seo web development website designer freelance

behaviorFunction()

Description

Inserts one or more functions—surrounded by <SCRIPT LANGUAGE="JavaScript"></SCRIPT> tags, if none yet exist—into the HEAD of the user's document.

Arguments

None.

Returns

expects either a string that contains the JavaScript functions or a string that contains the names of the functions to be inserted in the user's document. This value must be exactly the same every time (it cannot depend on input from the user). The functions are inserted only once, regardless of how many times the action is applied to elements in the document.

Note: Quotation marks within the returned string must be preceded by a backslash (\) to avoid errors that the JavaScript interpreter reports.

Example

The following instance of behaviorFunction() returns a function called MM_popupMsg() :

function behaviorFunction(){ return ""+ "function MM_popupMsg(theMsg) { //v1.0\n"+ " alert(theMsg);\n"+ "}"; }

The following example is equivalent to the preceding behaviorFunction() declaration and is the method used to declare behaviorFunction() in all behaviors that come with :

function MM_popupMsg(theMsg){ //v1.0 alert(theMsg); } function behaviorFunction(){ return "MM_popupMsg"; }

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117

India web developer website development India