[thelist] JavaScript: link method

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Mon Sep 9 16:07:01 CDT 2002


>When this chunk is executed within document.write(), it returns <a
>href=""http://www.yahoo.com/">string</a> in the source code of new page. Is
>there any way to assign a target attribute in this anchor tag with the help
link
>method?

I'm not Javascript guru, but why couldn't you just do this:

	var s = "<a href='http://www.yahoo.com' target='_blank'>string</a>";
	document.write(s);

-dave



More information about the thelist mailing list