在你想插入图象的地方插入一个块或层,这个块或层指定的就是:<img src="dress.jpg" align="left" valign="bottom">.不过好象你这么做也没什么意义吧,因为你还是需要手动的去添加这些标记不清楚你真正的目的是什么.

解决方案 »

  1.   

    To snowredfox(スノーの路人乙) :不是手动,是程序控制自动插入到文本里,然后再形成一个新的HTML页面。我是要通过程序控制自动生成网页页面,这就是我的真正目的,知道了吧?请多帮忙啦!我这里急死啦!急!急! 急!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      

  2.   

    在原有的html页面里添加HTML注释标记<!--图片-->
    程序解析HTML文件,将标记替换之,生成新HTML页面输出
      

  3.   

    在原有的html页面里添加HTML注释标记<!--图片-->
    程序解析HTML文件,将标记替换之,生成新HTML页面输出
      

  4.   

    那你肯定要生成新的html,
    你去看看xml吧!
    或许能帮上你!
      

  5.   

    你说的意思是不是这样,给一个html文本,然后再给一个带html标记的字符串,还有一个文本中的行数,用一个JAVA方法来实现对这个html文本的插入?那么告诉我你的邮件地址,我给你发Source。
      

  6.   

    To idpmud(泥潭):是的,大致就是这样俺的邮件地址是[email protected]
      

  7.   

    public void insertFile(String strFileHtml, String strInsert, int nLine)
    //throws errorException
    {
    File fileName = new File(strFileHtml);
    BufferedReader bufrFile;
    Vector vectFile = new Vector();

    //==============================================================
    /// check whether or not the file is valid
    //==============================================================
    //if (check File Error)
    //{
    // throw new errorException("file error");
    //} try
    {
    bufrFile = new BufferedReader(new InputStreamReader(
    new FileInputStream(fileName), GB2312));

    //==========================================================
    //// insert file
    //==========================================================
    while (bufrFile.ready() )
    {
    String strTemp = bufrFile.readLine();
    if (strTemp != null && strTemp.trim().length() != 0) 
    {
    vectFile.addElement(strTemp);
    }
    }

    bufrFile.close();
    bufwDBFile=new BufferedWriter(new OutputStreamWriter(
    new FileOutputStream(fileName), GB2312));
    String strEnter = "\r\n";

    //==========================================================
    //// Write to file from vectfile
    //==========================================================
    for (int i = 0; i < vectFile.size(); i++)
    {
    if (i == nLine) 
    {
        bufwDBFile.write(strInsert,0,strInsert.length());
        bufwDBFile.flush();
    }
    strLine = vectFile.elementAt(i).toString() + strEnter;
    bufwDBFile.write(strLine,0,strLine.length());
    bufwDBFile.flush();
    }

    bufwDBFile.close();
    }
    catch(IOException e)
    {
    //throw new errorException("write error", );
    }
    return ;
    }
    这是我以前作的文本数据库的两个小方法的合并,你可以把他们打开3个方法来用,
    分别为writeFile, readFile, insert。建议。
      

  8.   

    不用给你发Mail了,我在国外,不太方便用公司的Mail。