webForumDet fria alternativet

Hjälp med funktion

1 svar · 249 visningar · startad av andreas_lindh

andreas_lindhMedlem sedan jan. 20011 140 inlägg
#1

har den här funktione som lägger til len img tagg i en textruta

function UseImage(){
	if (document.getElementById("ImageName").value != null){
		imageLink = "<img src=\"<%Response.Write(basePath);%>" + document.getElementById("ImageName").value + "\" />";
		window.opener.FTB_InsertText("<% Response.Write(Request.QueryString["textboxname"]); %>",imageLink);
		this.focus();
		
		//if you want the window to close after one useage enable this
		//this.close();
	}
}

Nu vill jag lägga till alt="bild" på img taggen men jag får inte med " runt bild.
Hur ska jag skriva för att få med " runt bild?

@ndersMedlem sedan juni 200032 969 inlägg
#2
		imageLink = "<img src=\"<%Response.Write(basePath);%>" + document.getElementById("ImageName").value + "\" alt=\"bild\" />";
136 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
132 ms — hämta tråd, inlägg och bilagor (db)