Metro

Kirsten dunce

Maybe Spider-Man could have saved her — from herself.

Actress Kirsten Dunst giggled her way through a half-hour on a Manhattan witness stand yesterday, apparently at sea when it comes to speaking in public without the help of a Hollywood script.

Dunst, 27, who plays love interest Mary Jane in all three “Spider-Man” movies, was in court to do the kind of serious work usually left to her on-screen superhero sweetie — nailing a thief, in this case the Brooklyn car mechanic accused of swiping her handbag in 2007.

But the ditzy Dunst virtually fluttered into court in a black blouse, tight black pants and black stilettos, flipping her long blond hair and giving the judge a perky “Hi, how ya doin’?” even before sitting down in the witness chair.

Then — in oddly cheerful testimony punctuated by girlish chirps of “I mean,” and “OK,” and “Like,” and “Yeah!” — the actress de scribed how, two years ago, she returned to her swanky penthouse suite at the Soho Grand to find her $2,000 Balenciaga purse had vanished from where she’d left it on a bed.

“We realized — yeah! — somebody had taken it,” the ac tress told jurors, de scribing the moment she and British co- star Simon Pegg re turned to the pent house to find their “things” had vanished. The $3,500-a-night suite was being used as a green room as they filmed scenes for “How to Lose Friends & Alienate People” in the hotel lobby and on West Broadway.

“Like, it could have been five times, I can’t really remember,” the star laughed when prosecutor Patricia Stolfi asked how many times she’d been in and out of the penthouse that night.

Asked the approximate time, she giggled again, “The sun was setting. I mean rising! Excuse me!”

Taken in the burglary were Dunst’s bag containing sunglasses, a hairbrush and a wallet holding her California driver’s license, credit cards and $2,000 in cash.

Pegg later told jurors he was frantic after finding “my belongings had gone.” He lost a cellphone, an iPod and a camera in the heist.

The alleged villain is James Jimenez, a mechanic and convicted shoplifter linked to the crime by DNA. The evidence was found on a coffee cup he allegedly swiped from hotel hospitality and by surveillance footage showing him leaving the penthouse with a bag.

Dunst got her purse back, she told jurors. Prosecutors say Jimenez — and his convicted heroin-dealer accomplice, Jarrod Beinerman, who pleaded to the burglary last year — dumped it in a Brooklyn mailbox, minus the $2,000.

For all her giggles, Dunst did what prosecutors needed — tell jurors that Jimenez did not have permission or authority to either enter her suite or possess her handbag.

laura.italiano@nypost.com