/    Sign up×
Community /Pin to ProfileBookmark

maske a String

want to mask folowin string String

var myVar = ‘ <div onMousemove=test(‘ON’)>Hallo</div> ‘;

window.setTimeout(‘AFunction(‘+ ” ‘ “+ myVar +” ‘ “+’)’,2000);

function AFunction(Str)
{
something
……..
}

so I becom alway a error that ‘)’ is missing

who can one maske the last string

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PittimannJun 11.2004 — Hi!

Just use this instead of your first line:

var myVar = ' <div onMousemove=test("ON")>Hallo</div> ';

Cheers - Pit
×

Success!

Help @swing spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...