snipt

Ctrl+h for KB shortcuts

JavaScript

Upload and Write Other Document - Javascript

document.write('<IMG SRC="'{uploadImage} + image_filename + '">')
https://snipt.net/embed/83bc71cb1536ca920fa1df7169cc94a3/
https://snipt.net/raw/83bc71cb1536ca920fa1df7169cc94a3/
83bc71cb1536ca920fa1df7169cc94a3
js
JavaScript
1
2016-04-30T18:18:58
True
False
Mar 23, 2016 at 12:23 PM
/api/public/snipt/144905/
upload-and-write-other-document-javascript
<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 id="L-1"><a name="L-1"></a><span class="nb">document</span><span class="p">.</span><span class="nx">write</span><span class="p">(</span><span class="s1">&#39;&lt;IMG SRC=&quot;&#39;</span><span class="p">{</span><span class="nx">uploadImage</span><span class="p">}</span> <span class="o">+</span> <span class="nx">image_filename</span> <span class="o">+</span> <span class="s1">&#39;&quot;&gt;&#39;</span><span class="p">)</span> </span></pre></div> </td></tr></table>
"upload and write", javascript, js

JavaScript

replace A HREF to SPAN

1
2
3
$('.head-recall').each(function () {
	$(this).replaceWith('<span>' + $(this).html() + '</span>');
});
https://snipt.net/embed/365826b2618249f8163f4b9d7bef8984/
https://snipt.net/raw/365826b2618249f8163f4b9d7bef8984/
365826b2618249f8163f4b9d7bef8984
js
JavaScript
3
2016-04-29T03:55:35
True
False
Apr 02, 2014 at 09:26 AM
/api/public/snipt/126750/
replace-a-href-to-span
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.head-recall&#39;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">replaceWith</span><span class="p">(</span><span class="s1">&#39;&lt;span&gt;&#39;</span> <span class="o">+</span> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">html</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;&lt;/span&gt;&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
javascript, js
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.