12345678910111213141516171819202122232425262728293031 |
- <head>
- <h1>
- <head>
- <h1>Full Name</h1>
- </head>
- <body>
- <script>
- let sName = prompt("Enter surname").toLowerCase().trim();
- sName = sName[0].toUpperCase() + sName.slice(1);
- let name = prompt("Enter name").toLowerCase().trim();
- name = name[0].toUpperCase() + name.slice(1);
- let fatherName = prompt("Enter father name").toLowerCase().trim();
- fatherName = fatherName[0].toUpperCase() + fatherName.slice(1);
- let fullName = sName + ' ' + name + ' ' + fatherName;
- alert(fullName);
- /*sname = getName("surname");
- name = getName("name");
- fatherName = getName("father name");
- function getName(nameType){
- let sName = prompt("Enter " + nameType).toLowerCase().trim();
- sName = sName[0].toUpperCase() + sName.slice(1);
- return sName;
- }*/
- </script>
- </body>
- </h1>
- </head>
|