Javascript Question and Answer
Javascript Question and 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":
53. <script language="javascript">
function x()
{
var qpt = "QualityPointTechnologies";
var pattern = /point/;
var output= qpt.search(pattern);
document.write("Position: " + output);
}
</script>
function x()
{
var qpt = "QualityPointTechnologies";
var pattern = /point/;
var output= qpt.search(pattern);
document.write("Position: " + output);
}
</script>
- Position-7
- Position-1
- null
- error
54. --------------- method returns the number of milliseconds in a date string.
- setHours()
- setMinutes()
- parse()
55. ------------- converts a string to floating point numbers.
- eval
- ParseInt
- ParseFloat
- None
56. ---------------------- attempts to evaluate a string representing any javascript literals or variables, converting it to a number.
- eval
- parseFloat
- parseInt
- None
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.
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()