Javascript Question and Answer

Javascript Question and Answer
51. Which feature is supported in MSIE 3.x?
  • split()
  • document.clear()
  • join()
  • charAt()
Show Answer
52. How to speicfy the color of the hypertext links with JavaScript ?
  • document.linkColor="#00FF00";
  • document.LColor="#00FF00";
  • document.LinkC="#00FF00";
  • document.hyperTextLink="#00FF00":
Show Answer
53. <script language="javascript">
function x()
{
var qpt = "QualityPointTechnologies";
var pattern = /point/;

var output= qpt.search(pattern);

document.write("Position: " + output);
}
</script>
  • Position-7
  • Position-1
  • null
  • error
Show Answer
54. --------------- method returns the number of milliseconds in a date string.
  • setHours()
  • setMinutes()
  • parse()
Show Answer
55. ------------- converts a string to floating point numbers.
  • eval
  • ParseInt
  • ParseFloat
  • None
Show Answer
56. ---------------------- attempts to evaluate a string representing any javascript literals or variables, converting it to a number.
  • eval
  • parseFloat
  • parseInt
  • None
Show Answer
57. Which is not an attribute of the cookie property?
  • path
  • host
  • secure
  • domain
Show Answer
58. How do substring() and substr() differ?
  • One is not a method of the String object.
  • substr() takes three arguments, substring() only two.
  • Only one accepts a desired string length as an argument.
  • Besides the spelling, nothing.
Show Answer
59. Which is not a reserved word?
  • interface
  • short
  • program
  • throws
Show Answer
60. In Javascript, Which of the following method is used to find out the character at a position in a string?
  • charAt()
  • CharacterAt()
  • CharPos()
  • characAt()
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test