Well, you did mess up your single quotes in the document.write
. I fixed it in this, see if it works:
<script type="text/javascript">
var Order[0]="1";
var Order[2]="2";
var Order[3]="4";
var File1=Order[2]+"/"+Order[0]+"/"+%Order[4];
document.write("<script type='javascript' src='http://abc.com/i_sale_third/10957/" + File1 + "'>";
</script>
Edits. Try the following code.
Maybe the little %
is messing it up too right before Order[4]
(and beside the fact that you may not have defined Order[4]
). I also added the console.log to your code so open up your console (in Chrome and Safari it is dev tools). You also didn't need to repeat var
keyword (you can separate them by commas if you didn't know) and according to @ajax333221 (and me) you need to initialize Order
by doing Order = []
:
<script type="text/javascript">
var Order = [],
Order[0] = "1",
Order[2] = "2",
Order[3] = "4",
File1 = Order[2] + "/" + Order[0] + "/" + Order[3]; // I think you meant Order[3] not Order[4] here
if(console) console.log(File1); // this will print File1 into the console so you can see the string output
document.write("<script type='javascript' src='http://abc.com/i_sale_third/10957/" + File1 + "'></script>");
</script>