dポイントプレゼントキャンペーン実施中!

アメブロで、スクリプトエラーを回避する方法を教えてください。

以下のプログラムは、C#で作っています。
アメブロの検索画面にてテキストボックスに代入すると、スクリプトエラーが出ます。
この表示を出さないようにするには、どのようにしたらいいですか。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WebBrowserTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Text = "MyBrowser";
this.comboBox1.Text = "http://search.ameba.jp/";
//this.comboBox1.Text = "http://www.google.co.jp/webhp?sourceid=navclient …
}


/// <summary>
/// DocumentCompletedイベントは、ドキュメントの読み込みが終了したときに発生します。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlElementCollection all = webBrowser1.Document.All;
HtmlElementCollection forms = all.GetElementsByName("q");
forms[0].InnerText = @"c#"; // テキストボックスに「C#」を入力

}

「アメブロで、スクリプトエラーを回避したい」の質問画像

A 回答 (1件)

そのままだとしたら括弧の閉じがたりない。

この回答への補足

もし、かっこの閉じが足りなかったら、ビルドは通らないので考えにくいと思います。

記事へのコピーミスではないでしょうか?

補足日時:2011/02/08 16:25
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!