Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

javascript


ghost's Avatar
0 0

i want to know if it is possible and if so, how i can create a site search in javascript iwant it to search the specified url

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form id="searcg" name="search" action="">
  <label>Search value:
  <input type="text" name="value" tabindex="1" />
  </label>
  <label>url:
  <input type="text" name="url" tabindex="2" />
  </label>
  <label>
  <input name="Search" type="submit" id="Search" tabindex="3" value="Search" />
  </label>
  <script language="javascript">
  function search () {
  if search =="";
  Alert("please enter all fields");
  window.location.href="search.html";
	  }
  else {
  ?
	  }
  }
  function value () {
  if value ="" && value !="http://*"
  Alert("please enter all fields")
    window.location.href="search.html";
	  }
  else {
  ?
	  }
  }
  
</form>
</body>
</html>```
im no expert with javascript so correct me and tell me how to implement the search

ghost's Avatar
0 0

you need to be more specific in what you want to search. however. it's probably not going to be very easy in javascript since it's client-side.


ghost's Avatar
0 0

yeah i now it wont be easy but i just want to searchlike content of a site likethe ctr+f function


ghost's Avatar
0 0

PHP would probably be the way to go mate.


ghost's Avatar
0 0

i need it in js i know how to do it in php