We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d73b297 commit 4bdac8eCopy full SHA for 4bdac8e
assignment7.html
@@ -0,0 +1,28 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+</head>
9
+<body>
10
+ <script>
11
+ var str = prompt("Enter a string");
12
+var flag = false;
13
+for(var i=0; i<str.length; i++){
14
+ if(str[i]>='0' && str[i]<='9'){
15
+ flag = true;
16
+ break;
17
+ }
18
+}
19
+if(flag){
20
+ alert("String contains digit");
21
22
+else{
23
+ alert("String does not contain digit");
24
25
+ </script>
26
+
27
+</body>
28
+</html>
0 commit comments