开发者

How to change the URl Link in my Javascript

开发者 https://www.devze.com 2023-04-04 08:08 出处:网络
I am new to javascript can any body help me out urls = urls + \"stm_aix(\\\"p3i0\\\", \\\"p1i0\\\", [0, \\\"\" + item.helpLinkDescription + \"\\\", 开发者_StackOverflow\\\"\\\", \\\"\\\", -1, -1, 0,

I am new to javascript can any body help me out

 urls = urls + "stm_aix(\"p3i0\", \"p1i0\", [0, \"" + item.helpLinkDescription + "\", 开发者_StackOverflow\"\", \"\", -1, -1, 0, \"" + item.helpLink1 + "\", \"_self\", \"\", \"Help Topics\", \"060508icon4.gif\", \"060508icon5.gif\"], 526, 0);";

in the place of item.helpLink1 I have to show something like this

ShowURL(item.helpLink1);

that is I am dynamically generating this helplinks in ShowURL method.

so that I can use this ShowURL method to pass this helpLink.

Can any body help me out how to update my code.


It's a little bit hard to tell exactly what you're asking. Here's what I understand so far:

If all you need to do is replace item.helpLink1 with your new method you can simply drop it in the same place.

urls = urls + [...] + ShowURL(item.helpLink1) + [...]


I guess you should use javascript's "eval" function which calls the function something like below.

 urls = urls + "stm_aix(\"p3i0\", \"p1i0\", [0, \"" + item.helpLinkDescription + "\", \"\", \"\", -1, -1, 0, \"" + eval(ShowURL(item.helpLink1)) + "\", \"_self\", \"\", \"Help Topics\", \"060508icon4.gif\", \"060508icon5.gif\"], 526, 0);"; 
0

精彩评论

暂无评论...
验证码 换一张
取 消