Wednesday, February 8, 2017

viewer

*
frame
this
<input id="atnbg20170208w1313" />
<a href="javascript:atnbg20170208w1313()" style="color: greenyellow; font-size: 2em;">*</a>
<br />
<div id="atnbg20170208w1313f">
frame</div>
<div style="color: burlywood;">
this</div>

<script>

function atnbg20170208w1313() {

var thecode = ""

function addrecord(url,thecode) {
thecode = thecode + '<a href="' + url + '" imageanchor="1"><img src="' + url + '" style="width:300px" /></a>'}

function addlink(symbol,thecode) {
thecode = thecode + '&nbsp;<a href="http://elite.finviz.com/quote.ashx?t=' + symbol + '" style="font-size:2em;color:burlywood" target="_blank">f</a>&nbsp;'}

function symbol(url) {return url.split("/")[url.split("/").length - 1].split("c")[0]}

function addupdater(symbol,thecode) {
var theurl = 'http://elite.finviz.com/chart.ashx?t=' + symbol + '&ty=c&ta=st_c,sch_200p,sma_50,sma_200,sma_20&p=d&s=l'
thecode = thecode + '<a href="' + theurl + '" imageanchor="1"><img src="' + theurl + '" style="width:300px" /></a><br />'}

var thelist = document.getElementById("atnbg20170208w1313").value.split(",")
for (var i = 0; i < thelist.length; i = i + 1) {
addrecord(thelist[i],thecode); addlink(symbol(thelist[i]),thecode); addupdater(symbol(thelist[i]),thecode}
document.getElementById("atnbg20170208w1313f").innerHTML = thecode}

</script>

No comments:

Post a Comment