Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Javascript/program-6/read.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Program-4
# Program-6
## This is a javascript program for character processing

33 changes: 33 additions & 0 deletions Javascript/program-7/program-7.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>
<head>
<title>Searching strings with index Of amd LastIndex of</title>

<script type="text/javascript">
var l="abcdefghijklmnopqrstuvwxzabcdefghijklm"
function buttonPressed()
{

sForm.first.value=l.indexOf(sForm.inputVal.value);
sForm.last.value=l.lastIndexOf(sForm.inputVal.value);
sForm.firstl2.value=l.indexOf(sForm.inputVal.value,12);
sForm.lastl2.value=l.lastIndexOf(sForm.inputVal.value,12);
}
</script>
</head>
<body>
<form name="sForm" action="">
<h1>The String to search is:</br>abcdefghijklmnopqrstuvwxyzabcdefghijklm</h1>
<p>Enter substring to search for
<input name="inputVal" type="text"/>
<input name="search" type="button" value="search" onclick="buttonPressed()"/><br/></p>
<p>First Occurace located at index
<input name="first" type="text" size="5"/>
<br/>Last occurance located at index
<input name="last" type="text" size="5"/>
<br/>First occurance from index l2 located at index
<input name="firstl2" type="text" size="5"/>
<br/>last occurance from index l2 located at index
<input name="lastl2" type="text" size="5"/></p>
</form>
</body>
</html>
4 changes: 4 additions & 0 deletions Javascript/program-7/read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Program-7

## This is a javascript program for string searching

21 changes: 21 additions & 0 deletions Javascript/program-8/program-8.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Welcome to Javacsript!";
}
</script>
</head>

<body>

<p>When you click "Try it", a function will be called.</p>
<p>The function will display a message.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

</body>
</html>
4 changes: 4 additions & 0 deletions Javascript/program-8/read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Program-8

## This is a javascript program for javascript function basic program