باسلام..
کد جاوا اسکریپتش تقدیم شما:
[JSS]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function generate(){
var mainCode="";
precode='<a href="'+document.getElementById('ref').value+'" ><img src="[src]" width="'+parseInt(document.getElementById('wh').value)+'" height="'+parseInt(document.getElementById('ht').value)+'" alt="'+document.getElementById('wh').value+'" /></a><br />\n';
imgAddrs=document.getElementById('imgs').value;
imgAddrs=imgAddrs.split("\n");
for(i=0;i<imgAddrs.length;i++){
mainCode+=precode.replace('[src]',imgAddrs);
}
document.getElementById('out').value=mainCode;
}
</script>
</head>
<body>
images:
<textarea id="imgs">
</textarea><br />
width:<input type="text" id="wh" /><br />
height:<input type="text" id="ht" /><br />
alt:<input type="text" id="alt" /><br />
href:<input type="text" id="ref" /><br />
<input type="button" onclick="generate();" value="Generate" /><br />
output:
<textarea id="out" style="border:1px dotted #333">
output
</textarea>
</body>
</html>
[/JSS]
موفق باشید..