Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

HTML

Pepper Alert Example

1
2
3
4
<div data-alert class="alert-box warning radius">
  Hmm, something went wrong there. Try again?
  <a href="#" class="close">&times;</a>
</div>
https://snipt.net/embed/356d5ec609b3da5a0735e18e00145ac7/
https://snipt.net/raw/356d5ec609b3da5a0735e18e00145ac7/
356d5ec609b3da5a0735e18e00145ac7
html
HTML
4
2016-12-05T05:52:23
True
False
False
Mar 11, 2014 at 05:18 PM
/api/public/snipt/121041/
pepper-alert-example
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">div</span> <span class="na">data-alert</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;alert-box warning radius&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> Hmm, something went wrong there. Try again? </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;close&quot;</span><span class="p">&gt;</span><span class="ni">&amp;times;</span><span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
alert, html

HTML

Bootstrap Alert

1
2
3
4
<div class="alert">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <strong>Warning!</strong> XAML is not HTML
</div>
https://snipt.net/embed/41bc00528785775dd45bf71a11ee3b07/
https://snipt.net/raw/41bc00528785775dd45bf71a11ee3b07/
41bc00528785775dd45bf71a11ee3b07
html
HTML
4
2016-12-02T20:19:36
True
False
False
Nov 13, 2013 at 11:48 AM
/api/public/snipt/93952/
bootstrap-alert
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;alert&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;button&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;close&quot;</span> <span class="na">data-dismiss</span><span class="o">=</span><span class="s">&quot;alert&quot;</span><span class="p">&gt;</span><span class="ni">&amp;times;</span><span class="p">&lt;/</span><span class="nt">button</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>Warning!<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;</span> XAML is not HTML </span><span id="L-4"><a name="L-4"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
alert, bootstrap

JavaScript

alert

alert("hi snipt")
https://snipt.net/embed/6b72b23865756a2fcb83add758945d5b/
https://snipt.net/raw/6b72b23865756a2fcb83add758945d5b/
6b72b23865756a2fcb83add758945d5b
js
JavaScript
1
2016-12-03T03:26:25
True
False
False
/api/public/snipt/48675/
alert-3
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nx">alert</span><span class="p">(</span><span class="s2">&quot;hi snipt&quot;</span><span class="p">)</span> </span></pre></div> </td></tr></table>
alert, javascript

JavaScript

Js Confirmation Alert

1
2
3
4
5
6
7
// From http://www.sastgroup.com/tutorials/confermare-unazione-con-javascript

function confermaMessaggio(messaggio, url) {
	if (confirm(messaggio)) {
		location.href = url;
	}
}
https://snipt.net/embed/485e0e6a542820db0246c52ef525c1f3/
https://snipt.net/raw/485e0e6a542820db0246c52ef525c1f3/
485e0e6a542820db0246c52ef525c1f3
js
JavaScript
8
2016-11-29T22:01:23
True
False
False
/api/public/snipt/21613/
js-confirmation-alert
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">// From http://www.sastgroup.com/tutorials/confermare-unazione-con-javascript</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="kd">function</span> <span class="nx">confermaMessaggio</span><span class="p">(</span><span class="nx">messaggio</span><span class="p">,</span> <span class="nx">url</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">if</span> <span class="p">(</span><span class="nx">confirm</span><span class="p">(</span><span class="nx">messaggio</span><span class="p">))</span> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="nx">location</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="nx">url</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">}</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
alert, confirmation, javascript, js

JavaScript

js hello world

window.alert("hello snipt");
https://snipt.net/embed/c8040a51950f7c975ecceabc7a5e9938/
https://snipt.net/raw/c8040a51950f7c975ecceabc7a5e9938/
c8040a51950f7c975ecceabc7a5e9938
js
JavaScript
1
2016-12-05T18:56:11
True
False
False
Jul 19, 2012 at 11:58 AM
/api/public/snipt/2027/
js-hello-world
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">window</span><span class="p">.</span><span class="nx">alert</span><span class="p">(</span><span class="s2">&quot;hello snipt&quot;</span><span class="p">);</span> </span></pre></div> </td></tr></table>
"hello world", alert, javascript
Copyrighted, illegal, or inappropriate content? Email [email protected].