开发者

Using Eval in watin

开发者 https://www.devze.com 2023-01-28 11:16 出处:网络
I\'ve been getting error when trying to implement this ie.Eval(\"$(this).parent().removeClass(\"sortHelper\");\");

I've been getting error when trying to implement this

   ie.Eval("$(this).parent().removeClass("sortHelper");");

I was refering to this page :fire jQuery

and visual studio finds a syntax error.Is this the correct way fo开发者_C百科r me to declare Eval?


You can see from the syntax coloring on Stack Overflow that you are prematurely terminating the string. Change your quotes to this:

ie.Eval('$(this).parent().removeClass("sortHelper");');

See the difference?


Switch the quotes from the previous answer (single quotes are for char):

ie.Eval("$(this).parent().removeClass('sortHelper');");

0

精彩评论

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

关注公众号