Skip to content

Instantly share code, notes, and snippets.

View sandeshtandan's full-sized avatar

Sandesh Tandan sandeshtandan

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Editor</title>
<link rel="stylesheet" href="style.css">
</head>
<!-- File Upload input -->
<input type="file" onchange="upload(event);"><img id="image">
<!-- JavaScript -->
<script>
function upload(event) {
if (event.target.files.length > 0) {
var src = URL.createObjectURL(event.target.files[0]);
var preview = document.getElementById('image');
preview.src = src;
<!-- Form Section -->
<form name="form" onsubmit="return validateform()">
Email: <input type="text" name="email"><br>
<input type="submit" value="Submit">
</form>
<!-- Validate Form with javascript -->
<script>
function validateform() {
var x = document.form.email.value;
<!-- Form Section -->
<form name="form" onsubmit="return validateform()">
Name: <input type="text" name="name"><span id="nameloc"></span><br>
Password: <input type="password" name="password"><span id="passwordloc"></span><br>
<input type="submit" name="Submit">
</form>
<!-- Validate Form with javascript -->
<script>
function validateform() {
<!-- Form Section -->
<form name="form" onsubmit="return validateform()">
Number: <input type="text" name="number"><span id="numloc"></span><br>
<input type="submit" value="Submit">
</form>
<!-- Validate Form with javascript -->
<script>
function validateform() {
var number = document.form.number.value;
<!-- Form Section -->
<form action="" name="form" onsubmit="return validateform()" method="post">
Name: <input type="text" name="name"><br>
Password: <input type="password" name="password"><br>
Retype: <input type="password" name="retype"><br>
<input type="submit" value="Submit">
</form>
<!-- Script Section -->
<script>
<!-- Form Section -->
<form action="" name="form" onsubmit="return validateform()" method="post">
Name: <input type="text" name="name"><br>
Password: <input type="password" name="password"><br>
<input type="submit" value="Submit">
</form>
<!-- Validate Form with javascript -->
<script>
function validateform() {
<form action="" name="form" onsubmit="return validateform()" method="post">
Name: <input type="text" name="name"><br>
Password: <input type="password" name="password"><br>
<input type="submit" value="register">
</form>
<script type='text/javascript'>
function changeThumbSize(id,size){
var blogGadget = document.getElementById(id);
var replacement = blogGadget.innerHTML;
blogGadget.innerHTML = replacement.replace(/s72-c/g,&quot;s&quot;+size+&quot;-c&quot;);
var thumbnails = blogGadget.getElementsByTagName(&quot;img&quot;);
for(var i=0;i&lt;thumbnails.length;i++){
}
}
<script type='text/javascript'>
var numposts = 8;
var showpostthumbnails = true;
var displaymore = false;
var displayseparator = true;
var showcommentnum = false;
var showpostdate = true;
var showpostsummary = true;
var numchars = 100;
</script>