"TEST: w3.org tools Validator, spellchecker and link checker"
Bootstrap 3.1.0 Snippet by mrmccormack

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<div class="panel panel-primary">
<div class="panel-heading">
<img src="http://www.w3.org/Icons/w3c_home.png" class="center-block" alt="">
</div>
<div class="panel-body">
<blockquote>
<h2>TEST: Link generator for w3.org tools<small>Generate links for HTML validator, spellchecker and link checker</small></h2>
<img src="https://cdn1.iconfinder.com/data/icons/micro/scalable/actions/document-properties.png" class="pull-right" alt="">
<p>
<span class="label label-danger">BONUS Tip</span><br>
This snippet is a good tutorial on how to get information from user and write to a HTML page with jQuery without reloading the page and without server side scripting.
</p>
</blockquote>
<div class="form-group col-md-12">
<form name="forma">
<label for="code">Your URL</label>
<input type="text" ame="commentUser" id="commentUser" class="form-control" placeholder="http://yoursite.com" >
<br>
<button type="button" class="btn btn-success" value="Ready!" onClick="writeComment()">Generate Links</button>
</form>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
body{
background-color:#333;
}
.panel-body{
padding: 15px;
margin-left: 50px;
margin-right: 25px;
margin-top: 25px;
}
.container{
margin-top:60px;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
Ref. starting point
http://stackoverflow.com/questions/7195844/writing-text-on-div-using-javascript
*/
// validation link with referr
// <a href="http://validator.w3.org/check?uri=referer;ss=1"><span class="glyphicon glyphicon-check" style="color: #339900;"></span><small> HTML</small><sup>5</sup></a>
function writeComment(e) {
var comment = document.forma.commentUser.value;
var s; //string
alert(comment);
sVal = '<a href="http://validator.w3.org/check?uri=referer;ss=1"><span class="glyphicon glyphicon-check" style="color: #339900;"></span><small> HTML</small><sup>5</sup></a>' + comment;
sSpell = '<a href="http://www.w3.org/2002/01/spellchecker?uri=http://bootsnipp.com/iframe/82BW&&lang=en_US&suggest=on" title="check all links"><span class="glyphicon glyphicon-font" style="color: #f00;"></span></a>';
document.getElementById('preview').innerHTML = sVal;
document.getElementById('comments').innerHTML = sVal;
e.preventDefault();
return false;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: