Form validation and simple application in javascript

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

Рекомендации по теме
Комментарии
Автор

i am following your all vedio dada.please pray for me

UltimateFailsBD
Автор

<body>

<input type='text' id='text1' placeholder='Enter Age Between 1-20' autocomplete='off'>
<p id="p1" style="display: none" ></p>


<script>
document.querySelector('#text1').addEventListener('input', (event)=>{
let
if(a2>=1&&a2<=20){
console.log('your age: '+event.target.value);}
else{
console.log('enter age between 1 to 20! you entered '+event.target.value);
}
})
</script>
</body>

vineethreddy
Автор

function myValidation(){
let myValue =
if(isNaN(myValue) || myValue < 1 || myValue > 20){
// console.log('invalid input')
= 'this is an invalid input'
= "red";
}
else{
// console.log('this is a valid input');
= 'this is a valid input'
= "green";
}
}

ufranahmed
Автор

function myValidation() {
let myValue =
if (isNaN(myValue) || myValue < 1 || myValue > 20) {
console.log('Not a valid input');
const myPElements =
myPElements.textContent = "Not a valid input"
} else {
console.log('This input is ok');
const myPElements =
myPElements.textContent = "This input is ok"
}
}

sanjithsivapuram
Автор

The videos are jumbled after you started web structures and JS in the playlist. Some are not there in the playlist.

dharmeshchowdhary
Автор

If I understood assignment appropriately:

function myValidation() {
let myValue =
let valueToChange =
/*
let myValue =
let valueToChange =
*/
valueToChange.textContent = myValue
}

Interesting: if input text is empty / or filled with spaces only(!) /,
then second line is deleted, and all the lines below first line are shifted up.

zsoltventilla
Автор

function myvalidation(){
let

if (isNaN(myvalue) || myvalue<1 || myvalue>20) {
const newpara= valid input'
console.log(newpara)
}
else{
const was ok'
console.log(newpara)
}
}

pramodpatil
Автор

function myValidation(){
let myVal

if(isNaN(myVal)|| myVal < 1 || myVal >20){
let
changeP.textContent="not valid input"


}
else{
let
changeP.textContent="input OK"
}
}

shrutib
Автор

Here goes the assignment:

function myValidation() {
let myValue =
if(isNaN(myValue) || myValue<1 || myValue>20)
= 'Not a valid input'
else
= "This input is OK!"
}

nishchaysharma
Автор

function myValidation(){
let myValue =

if (isNaN(myValue)|| myValue < 1 || myValue > 20) {
let text =
text.textContent = 'not a valid input';
}
else{
text =
text.textContent = 'this was ok';
}
}

vishwasyadav
Автор

I thing Currently in may-19 lot of session is missing from this play list
and its getting worst due to disorderliness in play list


please make it correct you are good teacher and it'll really efficient we learn in sequential order

Thank you.

mohinijadhav
Автор

In the start of this video, you said that you've taught how to add listener for buttons. But, I've watched all the videos prior to this and it doesn't look like you taught that. Please check again and let us know. Thanks! :)

Denzil
Автор

document.querySelector('#myform').addEventListener('input', (event) => {
console.log('Your age is : ' +event.target.Value);
}
)

torgal
Автор

function myValidation(){
let myValue =
if (isNaN(myValue) || myValue <1 || myValue > 20){
var text1 = "Not a valid response"
console.log(text1);
}else
{
var text1 = "This is okkk"
console.log(text1)
}

//only to change the text of p
const myP = document.querySelector('p')
myP.textContent = text1
}

himanshurathi
Автор

function validate() {
let newText;
let value =
let modifier =

if (isNaN(value) || value < 1 || value > 20) {
newText = "Invalid Entry"
}
else {
newText = "WOWW";
}

modifier.textContent = newText
}

rabindrajoshi
Автор

function myValidation() {
let myValue =
console.log(myValue);
}

sanjithsivapuram
Автор

if (isNaN(myValue) || myValue < 1 || myValue > 20) {
= "Not a valid input "

} else {
= "This input is ok"
}

Bertoed
Автор

Hii I need help to generate 5 random number using js and at the end addition of 5 random numbers plz help

grbhavin
Автор

function valid(){

let value =

alert(typeof value)
if(isNaN(value) || value<1 || value>20 )
{
alert("Login Done")
}
else if(name=''){
alert("try agin")
}
}
//console.log(`${name}`)



This is treating value as a string!! what should i

piyushgarg
Автор

Should I use "onclick" event or "addeventlistener" for performing some action on button click?

ayushmanbt
join shbcf.ru