JavaScript - Symbol Meaning In Js
hello ..
I want know what is the mean of these symbol : || {} thanks .. Similar TutorialsThis prbl. appears only in IE: Code: l2 = obj.parentNode.getElementsByTagName("select")[0].value; --> object does not support this property or method Code: var l2 = obj.parentNode.getElementsByTagName("select")[0].value; --> OK explanation needed. the HTML code: Code: <ul id="ul1"> <li>1111</li> <li>2222</li> </ul> <div id="div1"></div> the javascript code: Code: var oDiv=document.getElementById('div1'); oDiv.style.left=getPos(this).left+this.offsetWidth+'px'; oDiv.style.top=getPos(this).top+'px'; function getPos(obj){ var aPos={left: null, top: null}; while(obj) { aPos.left+=obj.offsetLeft; aPos.top+=obj.offsetTop; obj=obj.offsetParent; } return aPos; } why it write the while loop,and what's effection of the while loop obj=obj.offsetParent; what's this line meaning? function args() { return arguments; } don't know the "return arguments; "meaning. Quote: Traversal also aids developers in affecting the elements immediately surrounding an element that is being manipulated or otherwise utilized by a script. This can range from adding a class to parent elements to indicate activity to disabling all inactive form elements to any number of other useful tasks. can't understand the above,the paragraph is from a book.what the author want to tell.anyone helps.thank you, I'm troubleshooting some issues with menus closing and when I alert the return value from something like: Code: timer = setTimeout("closeMenu(id)",500); I get 2,3,4. It seems to increment. Does that just represent how many times the timeout code has been executed? I have 3 Qs about ajax(1,2) and syntax meaning(3): 1- I want to appear a list of urls from a db table to browser, with their newest Google PAGE RANK every time appear in the webpage, and this rank saved auto to database along with previous.... google provides any web service for this? tell me URLs? I found difficulty contact google... 2- Do you know any internet web service (programming) that you input a Russian word, and get (true or 1) if valid, or (false or 0) if not valid word? 3- what mean the in file attached statements to html main file? script.js?x=5 or style.css?p=5 or xmlfile.xml?x=777. Question in title.
Reply With Quote 01-20-2015, 07:12 PM #2 jmrker View Profile View Forum Posts Senior Coder Join Date Aug 2006 Location FL Posts 3,175 Thanks 39 Thanked 510 Times in 504 Posts In the logic system, == means equal. ! means logical not. So != means not logically equal or not equal Example: x = 5 y = 6 x == y would be false but x != y would be true Reply With Quote 01-20-2015, 07:31 PM #3 felgall View Profile View Forum Posts Visit Homepage Master Coder Join Date Sep 2005 Location Sydney, Australia Posts 6,745 Thanks 0 Thanked 666 Times in 655 Posts == and != test value but not type and so can give unexpected results and so it is recommended that they be avoided. Code that uses them s generally poorer than code that uses === and !== which test for exact equality and non-equality (both value and type). For example: 5 == '5' 5 !== '5' Hi, my javascript does not working after I retrieve a record that contains square symbol in the database. The square symbol should be a newline in a textarea. This is how the record "looks" in the table: Actually, I am inserting the record using ASP and the value with square symbol is the value from a textarea with newline/enter. After that I retrieve the value using ASP and pass it to javascript and then the page is not working. If I retrieve other record which contain no square symbol then the script is working. Please help on this, appreciates! I'm making a calculator with javascript inside of my html, but I can't figure out the right way to produce a working ^ sign. I've searched online for 4 hours now. Does anyone happen to know what I should type? Here's my code Code: <form name="Calc" style="position: fixed; top: 25px; right: 5px; background: #5F4A29;" action=""> <table border="6"> <tr> <td colspan="4"><input type="text" name="Input" size="25" /></td> </tr> <tr> <td><input class="button" type="button" value=" c " onclick="Calc.Input.value = ''" /></td> <td></td> <td></td> <td><input class="button" type="button" value=" = " onclick="Calc.Input.value = eval(Calc.Input.value)" /></td> <tr> </tr> <td></td> <td><input class="button" type="button" value=" ( " onclick="Calc.Input.value += '('" /></td> <td><input class="button" type="button" value=" ) " onclick="Calc.Input.value += ')'" /></td> <td><input class="button" type="button" value=" ^ " onclick="Calc.Input.value += '^(x,y)'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 1 " onclick="Calc.Input.value += '1'" /></td> <td><input class="button" type="button" value=" 2 " onclick="Calc.Input.value += '2'" /></td> <td><input class="button" type="button" value=" 3 " onclick="Calc.Input.value += '3'" /></td> <td><input class="button" type="button" value=" + " onclick="Calc.Input.value += '+'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 4 " onclick="Calc.Input.value += '4'" /></td> <td><input class="button" type="button" value=" 5 " onclick="Calc.Input.value += '5'" /></td> <td><input class="button" type="button" value=" 6 " onclick="Calc.Input.value += '6'" /></td> <td><input class="button" type="button" value=" - " onclick="Calc.Input.value += '-'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 7 " onclick="Calc.Input.value += '7'" /></td> <td><input class="button" type="button" value=" 8 " onclick="Calc.Input.value += '8'" /></td> <td><input class="button" type="button" value=" 9 " onclick="Calc.Input.value += '9'" /></td> <td><input class="button" type="button" value=" * " onclick="Calc.Input.value += '*'" /></td> </tr> <tr> <td></td> <td><input class="button" type="button" value=" 0 " onclick="Calc.Input.value += '0'" /></td> <td><input class="button" type="button" value=" . " onclick="Calc.Input.value += '.'" /></td> <td><input class="button" type="button" value=" / " onclick="Calc.Input.value += '/'" /></td> </tr> </table> </form> |