开发者_开发技巧I can't believe it, but this is really happening. I ran out of available quote symbols using jquery and javascript native functions together. Can somebody help? Maybe there is yet another symbol?
var t=setTimeout('$("#popupChange").html('<img src="http://servername/pdf/picture/genericThrobber.gif" />');',2000);
EDIT: Firebug messages about "missing ) after argument list" error.
Escaping them using \'
should work.
var t=setTimeout('$("#popupChange")
.html(\'<img src="http://servername/pdf/picture/genericThrobber.gif" />\');',
2000);
(added line breaks to get rid of the scroll bar)
you could also pass an anonymous function instead of a string:
var t=setTimeout(function() { $("#popupChange")
.html('<img src="http://servername/pdf/picture/genericThrobber.gif" />');},
2000);
should be fine either way.
You need to escape the characters using a backslash.
On the inner '
, make it \'
精彩评论