I don't like giving out answers to homework questions, but here are some hints: 1) Which attribute is used for setting the background (in HTML)? Which property is used to set a background color with CSS (which is what style uses)?
2) Only one of those is correct. Check online for the  proper syntax.
3) The "short" operators have the operator then the = sign. Also, ! is a conditional operator for "not". 4) There is only one of those I would consider using... I don't like having to click to see my page. 5) Only one of those is correct. I bet you can figure out which one is needed to make a new array. 6) There is only one. onClick and onMouseOut don't sound like something a keyboard could do. Use google to figure out what the other two do. 7) Objects always have capital letters, so you should use them when you make a new one. 8) I think the second line needs to be "z = document.getElementById(y).style.display;". === is a comparison operator to compare something. The line that starts with a is an alternate form of an if statement with the syntax of contition : iftrue ? iffalse
9) Don't have a hint for this one. I recommend google again.
10) It'd be annoying for Javascript to work when it was turned off. >.>

Hope that helped, without giving it away. ;)

Also, Google is your friend. =)

Alexander Uribe wrote:
Hi there, I have some questions for an assignment that I can't figure out. If anyone could be of assistance that would be much appreciated. 1)Which instruction will change the background colour of an element?
A   document.getElementById("t").backgroundColor = "yellow"
*B*  document.getElementById("t").bgcolor = "yellow"
*C*  document.getElementById("t").style.backgroundColor = "yellow"
*D*  document.getElementById("t").style.color = "yellow"
2)
Which are the valid 'for' statement(s)
*A*  for x = 1 to 10
*B*  for(x=0; x<10; x++)
*C*  for(x=0, y=10; x<10; x++, y--)
*D*  for(x=0, x<10, x++)
3)
Which are the INCORRECT math equations
*A*  a =+ 20;
*B*  a = a + 20;
*C*  a = 20 / 4;
*D*  a++;
*E*  a != 30;
*F*  a =* 4;
*G*  a = 3;
4)
Which are the preferred methods to use when Javascript has been disabled ?
*A*  <noscript></noscript>
*B*  <a href="#" onCick=myFunction();">Show Page</a>
*C*  <a href="page1.htm">Show Page</a>
*D*  <a href="page1.htm" onCick=myFunction();">Show Page</a>
5)
An array can be initialised by
*A*  var a = new Array("ab","b","c");
*B*  var a = ["a","b","c"];
*C*  var a = ("a","b","c");
*D*  var a = a["a","b","c"];
6)
When you tab into a form control (i.e. a textbox) what event is executed
*A*  onMouseOut
*B*  onClick
*C*  onBlur
*D*  onFocus
7)
What syntax is needed to initalise a Regular Expression
*A*  var re = RegExp();
*B*  var re = new RegExp();
*C*  var re = regexp;
*D*  var re = new regexp();
8)
What does the following function do
function x(y){
document.getElementById(y).style.display;
a = (z=='block') ? 'none' : 'block';
z.a;
}
*A*  hide or shows a div tag
*B*  hide or shows an element
*C*  hide or shows a paragraph
*D*  hide or show a table
9) Which cross browser (but not W3C DOM compliant instructions) can be used to find the Height and Width of an object on a web page *A* clientWidth, clientHeight
*B*  scrollWidth, scrollHeight
*C*  scrollTop, scrollLeft
*D*  offsetWidth, offsetHeight
10)
If Javascript has been disabled by the user then
*A*  inline scripting will still work
*B*  only mouse events will still work
*C*  AJAX will still be useable
*D*  no scripts will be executed
Cheers.

------------------------------------------------------------------------
Join Lavalife for free. What are you waiting for? <http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D30288&_t=764581033&_r=email_taglines_Join_free_OCT07&_m=EXT>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************


--

Christian Snodgrass
Azure Ronin Web Design
http://www.arwebdesign.net/
Phone: 859.816.7955



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to