INF-306 無料問題集「IT Specialist HTML5 Application Development」

You want to display a message box showing the user ' s current latitude and longitude as identified by the user' s browser.
Complete the code by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct selection.
正解:

Explanation:
First drop-down: navigator.geolocation
Second drop-down: navigator.geolocation
Third drop-down: getCurrentPosition(showLocation)
The correct API object is navigator.geolocation because browser-based geographic location is exposed through the Geolocation API, not through window.location. window.location represents the current page URL and navigation state; it does not provide latitude or longitude. The first selection checks whether the browser supports geolocation by evaluating navigator.geolocation. Inside the block, the same object must be used to request the user's current position. The correct method is getCurrentPosition(showLocation), which requests the device's current location and passes a position object to the callback function when the location is available. The callback then reads position.coords.latitude and position.coords.longitude and displays those values with alert(). The alternatives that pass window.location are incorrect because they provide page- location information rather than geographic coordinates. The alternatives that call showLocation(...) directly are also incorrect because the browser must first retrieve the actual position object. References/topics:
Geolocation API, navigator.geolocation, getCurrentPosition(), callback functions, latitude and longitude.
You are creating a dietary request form for an upcoming conference. The form must include the following elements:
* The title " Conference Registration Form "
* A Name input field for the attendee ' s name
* A list of food options the attendee can select by using the mouse or typing Complete the code by moving the appropriate code segments from the list on the left to the correct locations on the right. You may use each code segment once, more than once, or not at all.
Note: You will receive partial credit for each correct response.
正解:

Explanation:
< !DOCTYPE html >
< html >
< body >
< h1 > The Fitness World Around Us - Spring Conference < /h1 >
< form action= " process.php " method= " post " >
< legend > Conference Registration Form < /legend >
< p > < label for= " name " > Name: < /label >
< input type= " text " id= " name " size= " 30 " maxlength= " 30 " value= " " / > < /p >
< input id= " food " placeholder= " Cuisine " list= " food-choice " size= " 40 " / > < br >
< datalist id= " food-choice " >
< option value= " Vegetarian " > Vegetarian < /option >
< option value= " Traditional " > Traditional < /option >
< option value= " Surprise Me " selected > Surprise Me < /option >
< /datalist >
< input type= " submit " >
< /form >
< /body >
< /html >
The correct solution must satisfy all three stated form requirements. The title " Conference Registration Form
" is supplied by the < legend > element in the first valid code segment. That same segment also includes the required attendee name field by using a < label > associated with an < input type= " text " > . The for= " name
" and id= " name " relationship makes the label programmatically connected to the input, which is the correct HTML form-accessibility pattern. For the food options, the correct choice is the segment that uses an < input
> element with a list attribute connected to a < datalist > element. This is required because the attendee must be able to select an option by using the mouse or type a value manually. A < select > element provides a fixed dropdown list, and radio buttons provide fixed clickable choices, but neither is the best match for a type-ahead list requirement. The < datalist > element supplies predefined options such as Vegetarian, Traditional, and Surprise Me while still allowing keyboard entry through the associated input field. References/topics: HTML5 forms, labels, text inputs, datalist, form usability, selectable and typed input options.
The development team just released a new version of an app for your team to test. Which three tasks should you perform during testing? Choose 3.

正解:B、D、E 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Which code segment correctly displays images with 80% transparency and a blue 8px shadow?

解説: (JPNTest メンバーにのみ表示されます)
Move the appropriate attributes from the list on the left to the correct descriptions on the right. You may use each attribute once, more than once, or not at all.
Note: You will receive partial credit for each correct match.
正解:

Explanation:
pattern # Provides a way to set a regular expression that the value must match placeholder # Provides a way to set default text that displays until focus is placed in an element required # Provides a way to set form elements as mandatory multiple # Provides a way to allow more than one file or email address in a single input The correct matches are based on standard HTML5 form validation and input-attribute behavior. The pattern attribute defines a regular expression that the input value must satisfy before the form can be submitted successfully. It is commonly used for structured values such as phone numbers, codes, postal formats, or custom identifiers. The placeholder attribute supplies short hint text inside an input field, helping the user understand the expected value before entering data. The required attribute makes a form control mandatory; if the field is empty, constraint validation prevents successful submission. The multiple attribute allows a single input to accept more than one value, specifically for controls such as input type= " file " and input type= " email " , where users may upload multiple files or enter multiple email addresses. The maxlength attribute is not used in these matches because it limits the maximum number of characters that can be entered, but none of the listed descriptions asks for character-length restriction. References/topics: HTML5 form attributes, constraint validation, pattern, placeholder, required, multiple, input validation.
You want to position a specific element so that it always directly follows the previous element, which is positioned by default, regardless of the viewport characteristics. Which positioning method should you use?

解説: (JPNTest メンバーにのみ表示されます)
Review the following markup segment:
< form action= " process.js " method= " get " >
< label for= " secretcode " > Secret Code < /label >
< input type= " text " name= " secretcode "
pattern= " [a-zA-Z]{4}-[0-9] {2}-[0-9]{4}-[a-zA-Z] {4} "
placeholder= " secretcode " >
< input type= " submit " value= " Submit " >
< /form >
Which entry will validate successfully according to the required pattern?

解説: (JPNTest メンバーにのみ表示されます)

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡