I have a simple HTML personality quiz, with a Javascript function for a set of radio buttons. I want to compute a score based on the numerical values of the responses to the “I see myself” questions; like an addition or a mean in a PHP script.
<script language="JavaScript1.2">
function writequestion(txt, qno)
{
document.write("<li><b> ... " + txt + "</b><br>")
document.write("Disagree")
document.write("  <input type=radio name=question[" + qno + "] value=1 checked>1")
for (i=2; i<=5; i++) {
document.write("  <input type=radio name=question[" + qno + "] value=" + i + ">" + i)
}
document.write("  Agree")
}
writequestion("is talkative", 1)
writequestion("does a thorough job", 2)
writequestion("is original, comes up with new ideas", 3)
writequestion("is helpful, unselfish with others", 4)
</script>
Create a method that takes two integers as arguments and return their sum
What is the difference between static and dynamic and enterprise web application
How to perform Sum and Difference in jQuery:
Given two strings inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.Input
Sample Input 1
JavaScript
S
Sample Output 1
Script
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const inputString = readLine();
const subString = readLine();
/* complete the function*/
}
i. Login page with username and password
ii. Contact form with Passport picture, Submit button
a. Create a folder with ‘’ My First Project_Student ID’’. Also, use HTML to create the main heading as ‘’MELCOM WEBSITE’’
b. For you to validate the login page and form. It is important to write JavaScript to ensure the accuracy of the form element before submission.
c. Provide five (5) images of your choice and include your Passport picture/image for the entire webpage.
d. Link the pages to each section to ensure effective navigation of the pages.
e. Use your skills in JavaScript to provide dynamism to your pages to meet your design.
Note:
a. You are required to bring texts of your own, paragraph, line break, and headings
b. Use any color of your choice where appropriate also use font style and font size where no further instruction is given.
Given two strings inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
let inputString = readLine();
const subString = readLine();
/* Write your code here */
}
}