Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,224 members, 7,815,281 topics. Date: Thursday, 02 May 2024 at 10:11 AM |
Nairaland Forum / Science/Technology / Webmasters / A Little Quiz (664 Views)
Please Webmasters I Need A Little Help With Making Money From My Site. / Most Confusing And Simple Maths Quiz / Very Easy Html/php Quiz :) (2) (3) (4)
A Little Quiz by yawatide(f): 2:14pm On Dec 11, 2008 |
NOTE: You must not google for the answer or copy and paste code in your browser. 1) visibility: hidden/visible and display: block/none - they are similar yet they are different. Explain 2) In javascript, you have the following code: var thisCodeWorks = 6/0; alert(thisCodeWorks); What does alert() output? As always, I will let a few jump in before I respond. Hey you! I see you googling, and you, I see you pasting in a browser. Just kidding |
Re: A Little Quiz by smartsoft(m): 4:11pm On Dec 11, 2008 |
yawa-ti-de: 1. @ya wa, Well, display: none entirely removes the element from the page, and the flow of the page is calculated as though the element were not there at all. On the other hand, visibility: hidden leaves the space in the document flow even though you can no longer see the element. Depending on what you are doing, that can make a huge 2. <script javascript = "text/javascript"> $var = thisCodeWorks = 6/0; alert(thisCodeWorks); </script> Output : Infinity i don't know if i broke the rule, but really i had to just correct that and make it work fyne , |
Re: A Little Quiz by yawatide(f): 4:28pm On Dec 11, 2008 |
smart, in reference to #2, so you are saying you had "to just correct that and make it work fyne" as PHP ($var), or did PHPScript come out and I don't know about it? Hmmm |
Re: A Little Quiz by smartsoft(m): 4:43pm On Dec 11, 2008 |
this your raw code yawa var thisCodeWorks = 6/0; alert(thisCodeWorks); main looking at the script is kind of vague u might not understand it don't know so i opend up my notepad did just this below <html> <head> <script javascript = "text/javascript"> $var = thisCodeworks =6/0; alert(thisCodeWorks); </script> </head> </html> Output : Infinity ( Olori oko ) Now you see in javascript alert is function that popup a small box, and why in php if you do that it output same thing the differents is the echo function to get the output, you need to declare a variable. which i did $var |
Re: A Little Quiz by yawatide(f): 5:11pm On Dec 11, 2008 |
okay o By the way, you are correct with the 2 answers. Quiz closed. I will think of another one to post |
Re: A Little Quiz by smartsoft(m): 5:21pm On Dec 11, 2008 |
but you yourself you bad ooo how you take think about that |
Re: A Little Quiz by yawatide(f): 5:30pm On Dec 11, 2008 |
he he, i like to ask questions that make people pause and think. To me, watz more important isn't that you have the answer right or wrong but that you apply some thought to problem-solving as opposed to making knee-jerk decisions, the latter being a meter that tells me that that is the same way you code |
(1) (Reply)
Javascripts Pls / Writing For Profit - Ebooks Can Be Very Profitable. / New In Town
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16 |