qq123123 发表于 2011-5-22 14:06:28

textarea 搞一天了,没办法了,上来求助一下(我要输入文本到textarea )

textarea 搞一天了,没办法了,上来求助一下(我要输入文本到textarea )
他是 xhEditor我查了一下,他也是兼容IE6.0 的,但是AU3 没办法兼容进去!
测试了好几种方法,都没办法,下面付代码!
xhEditor是一个基于jQuery开发的跨平台开源迷你XHTML编辑器组件!
地址:http://soufun.com/ask/Ask_StepTwo.aspx?asktitle=你好吗
登陆账号:sdfcxasdf
密码:asdfasdf111
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>
        提问-搜房问答
</title><link href="http://img.soufun.com/ggcp/ask/style/style.css?20100507" rel="stylesheet" type="text/css" /><link href="http://img.soufun.com/ggcp/ask/style/css/question.css?20100507" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

    function GetVCode()
{
        document.images['imgcode'].src = './include/VCode.aspx?question=true&code=' + Math.round(Math.random() * 10000);       
}
    //初始化文本编辑器
    var title="你好吗71947";   
   
   
      function optionsClear(object){
                var colls =[];
                colls = object.options;
                var length = colls.length;
                for(var i=length-1;i>=0;i--){
                        colls=null;
                }
        }

       function addOption(objSelectNow,txt,val){   
                var objOption = document.createElement("OPTION");   
                objOption.text = txt;   
                objOption.value = val;   
                objSelectNow.options.add(objOption);   
        }
       
                            function getcitys(opt,lev)
                            {                                                                                    
                            // alert('/ask/iframe/city.aspx?id='+opt.value+'&lev='+lev);
                           
                                 Xml.Request('/ask/iframe/city.aspx?id='+opt.value+'&lev='+lev , null, getcitysend,lev);
                              
                            }
                            function getcitysend(lev)
                            {
                           
                        
                            if(lev==1)
                            {
                            opt = document.getElementById("shi");
                              optionsClear(document.getElementById("qu"));   
                            }
                           
                            if(lev==2)
                            {
                              opt = document.getElementById("qu");
                            }
                           
                            optionsClear(opt);
                           strs=this.responseText.split(";");                           
                            if(strs.length-1>0)
                            addOption(opt,"请选择","0");
                                                               
                            if(lev==1)
                            {
                              tsheng=document.getElementById("sheng");
                              if(tsheng.value=='001032' ||tsheng.value=='001033' ||tsheng.value=='001034' ||tsheng.value=='00001')                           {   
                               addOption(opt,"",tsheng.value);
                               opt.value=tsheng.value;
                               }
                              
                            }                  
                           
                           for(var i = 0; i < strs.length-1; i++)
                           {
                           addOption(opt,strs.split(","),strs.split(","));
                              //document.write(strs.split(","));
                              //document.write(strs.split(","));
                           }
                                 //xx = this.responseXML.lastChild.firstChild.data;   
                            }
    </script>

    <script type="text/javascript">
                            //search
                            varasktitle="";
                            var iszidong=true;
                            function funsearch(opt)
                            {
                              if(opt.value==asktitle) return ;
                              if(opt.value=='') return ;
                              asktitle=opt.value;
                                 Xml.Request('/ask/iframe/search.aspx?asktitle='+escape(opt.value), null, getsearchend,opt.value);
                            }
                            //搜索结果数量。
                            var intcount =0;
                            function oninputtitleend()
                            {   var count=document.getElementById("inputasktitle").value.length;
                            if(count!=0){
                            if(count > 30 || count < 5){
                              document.getElementById("spMsg").innerHTML="<font color=red>标题长度须大于5小于30,超过30字的请填写在问题补充中!<font>";
                              document.getElementById("inputasktitle").focus();
                              }
                              else
                              {
                                 document.getElementById("spMsg").innerHTML="";
                              }
                            }                     
                              if(intcount ==0 && document.getElementById("inputasktitle").value!='')
                              {                              
                                    xiugaifenlei();
                              }
                            }
                            function getsearchend(v)
                            {
                              intcount = parseInt( this.responseXML.getElementsByTagName("count").childNodes.nodeValue);
                              //alert(dd);
                              
                               s="";
                               s =s+"<div class=\"bb_xjxg\">";

s =s+"                      <div style=\"clear:both;\">";
s =s+"                                  <div class=\"login\" >";
s =s+"                                    <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">                        ";
s =s+"                        <tr>";
s =s+"                            <td height=\"50\" colspan=\"3\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";


hits = this.responseXML.getElementsByTagName("hits");
f = "";
fenleic = 0;

//alert(hits.childNodes.getElementsByTagName("c").firstChild);
//alert(hits.childNodes.nodeValue);
for( i=0;i<hits.childNodes.length&&i<6;i++)
{
sc= hits.childNodes;
//分类;
if(fenleic<3 && sc.getElementsByTagName("c").firstChild !=null)
{
f=f+" <li><input name=\"radiobutton\" onclick=\"document.getElementById('cid').value=this.value\" type=\"radio\" class=\"f12\" id=\"radiobutton\" value=\""+sc.getElementsByTagName("classid").firstChild.nodeValue+"\"";
if(i==0)
{
    f=f+" checked=\"checked\"";
    if(iszidong)
    {
    document.getElementById("cid").value=sc.getElementsByTagName("classid").firstChild.nodeValue;
    }
}
f=f+"\/>";
f=f+"<label for=\"radiobutton\"><\/label> ";
f=f+sc.getElementsByTagName("c").firstChild.nodeValue;
f=f+"<\/li>";
fenleic++;
}
//分类;


s =s+"   <tr>";
s =s+"      <td height=\"24\"><div class=\"tiw_biaozhu f14\"><img src=\"http:\/\/img2.soufun.com\/ask\/images1\/ico_wenhao.gif\" alt=\"\" width=\"13\" height=\"13\" \/><a href=\"askdetail.aspx?id="+sc.getElementsByTagName("id").firstChild.nodeValue+"\" target=\"_blank\">&nbsp;"+sc.getElementsByTagName("title").firstChild.nodeValue +"<\/a><\/div><\/td>";
s =s+"    <\/tr>";
s =s+"      <tr>";
s =s+"       <td height=\"24\"><div class=\"tiw_biaozhu\"><img src=\"http:\/\/img2.soufun.com\/ask\/images1\/ico_tanhao.gif\" alt=\"\" width=\"13\" height=\"13\" \/>&nbsp;"+sc.getElementsByTagName("answercontent").firstChild.nodeValue +"<\/div><br/><\/td>";
s =s+"    <\/tr>";
s =s+"                   ";
}

if(intcount>0)
{
   document.getElementById("linkMore").innerHTML="<a href=\"/ask/search.aspx?asktitle="+(v)+"\" target=\"_blank\">更多&gt;&gt;<\/a>";
}
s =s+"    <\/tr>";
s =s+"                            <\/table><\/td>";
s =s+"                        <\/tr>";
s =s+"                                     <\/table>";
s =s+"                                  <\/div>";
s =s+"                               <\/div>";
s =s+"                   <\/div>";
document.getElementById("searchresult").innerHTML=s;
f=f+"<li class=\"tiw_xz\"><span style=\"text-decoration:underline; cursor:hand;color:red\"   onclick=\"xiugaifenlei()\">修改分类<\/span><\/li>";
document.getElementById("fenlei").innerHTML=f;
                              
}
function xiugaifenlei()
{
    iszidong=false;
    document.getElementById("zidong").style.display="none";
    document.getElementById("xuanze").style.display="";

}
                     functiongcv(){
   varaa=document.getElementsByName("ra");
   for(vari=0;i<aa.length;i++)
   {
         if(aa.checked)
         document.ftiwen.cid.value = aa.value;
   }
}
function G() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
    var element = arguments;
    if (typeof element == 'string')
        element = (document.getElementById)?document.getElementById(element):document.all.element;
    if (arguments.length == 1)
      return element;
    elements.push(element);
}
return elements;
}
function AlarmLogin() {
    transferNew('asktitle');
    return false;
}
                  
    </script>

</head>
<body>

    <script src="http://imgs.soufun.com/pic/passport/refer.js?1.1" type="text/javascript">        </script>

    <!--自适应背景顶部 部分 begin-->
   



<div class="top">

    <!--登录 end-->
    <!--LOGO+搜索 begin-->
    <div class="top2">
      <div class="top2right">
            <div class="top2right01 blue">
                <span class="fff">问答</span><a href="http://www.soufun.com/house/newhouse/Search_Result.aspx"
                  target="_blank" id="ask_1">新房</a><a href="http://esf.soufun.com/newsecond/sale_info/searchlist_new2.aspx?city=%B1%B1%BE%A9&district=&purpose=%D7%A1%D5%AC&room=&pricemin=&pricemax=&trackLine=&keyword=&renttype=&strCity=%B1%B1%BE%A9&strDistrict=&Strprice=&StrNameKeyword=&houseType=&isnewhouse=0&x=22&y=12"
                        target="_blank" id="ask_2">二手房</a><a href="http://rent.soufun.com/" target="_blank"
                            id="ask_3">租房</a><a href="http://home.soufun.com/" target="_blank" id="ask_4">装修设计</a><a
                              href="http://search.soufun.com/" target="_blank" id="ask_5">更多</a>
            </div>
            <div class="top2right02">
                <form method="get" name="search1" action="http://www.soufun.com/ask/search.aspx"
                  id="search1">
                  <input id="asktitle" name="asktitle" type="text" class="ask_input" style="vertical-align: middle;"
                        value="你好吗71947" /><input style="vertical-align: middle;" class="btn_search"
                            type="button" value="搜 索" onclick="document.getElementById('search1').submit()" />
                  <input class="btn_ask" style="vertical-align: middle;" type="button" value="提 问"
                        onclick="transfer('asktitle')" id="ask_32" /></form>
            </div>
      </div>
      <img src="http://img2.soufun.com/homepage/images/new_logo.gif" usemap="#Map" /><map
            name="Map" id="Map"><area shape="rect" coords="1,-1,101,47" href="http://www.soufun.com"
                target="_self" alt="Soufun.com - 搜房网首页" title="Soufun.com - 搜房网首页" /></map>
      <img src="http://img.soufun.com/ggcp/ask/images/wdlogo.gif?2011" usemap="#Map2" />
      <map name="Map2" id="Map2">
            <area shape="rect" coords="2,4,170,44" href="http://www.soufun.com/ask/" target="_self"
                alt="问答首页" title="问答首页" />
      </map>
    </div>
    <!--LOGO+搜索 end-->
    <!--导航 begin-->
    <div class="top3" id="divMenu">
      <ul>
            <li id="menu0" class="current_menu"><a href="/ask/" id="ask_6"><strong>问答首页</strong></a></li>
ite"><a href="/ask/loupan.html" id="ask_12"><strong>楼盘问答</strong></a></li>
      </ul>
    </div>
    <!--导航 end-->
</div>
<!--自适应背景顶部 部分 end-->
<div id="UserLogin" style="display: none; z-index: 100; left: 200px; position: absolute;
    top: 200px">
    <iframe name="Login" id="Login" allowtransparency="true" src="http://ask.soufun.com/ask/login.aspx"
      width="400" height="240" scrolling="no" frameborder="0"></iframe>
</div>
<popup element="UserLogin" modal="true" position="top center" offset="0,150"></popup>




<a id="addUname" href="javascript:;" style="display: none">请验证</a>
<div id="passport_addusername" style="display: block; z-index: 100;">
    <iframe name="Unamevild" id="Iframe1" allowtransparency="true" src="http://ask.soufun.com/ask/addName.aspx"
      width="380" height="210" scrolling="no" frameborder="0"></iframe>
</div>
<popup element="passport_addusername" modal="true" openbutton="addUname" position="top center" offset="0,150"></popup>

<script type="text/javascript" src="http://imgs.soufun.com/pic/Album/include/Root.Popup.js"></script>

<script type="type/vbscript">
Function GetByteCode(ch)   
    code = Asc(ch)         
    GetByteCode = Hex(code)
End Function
</script>

<script type="text/javascript">   
//    function vailShow(){
//            if('True'=='True'&&'False'=='False'&& '2'!="0")
//            {
//            document.getElementById("saveAnswer").onclick();
//            }
//            return false;
//      }
   function unameVailShow(){
            if('False'=='True')
            {
            __InitializePopups();
            document.getElementById("addUname").onclick();
            return;
            }
            
      }
      

function ShowLogin()
{
if(!document.getElementById('UserLogin_OpenButton'))
{
return false;
}
document.getElementById('UserLogin_OpenButton').onclick();
}

function addfavorite(){//加入收藏   
   if (document.all){   
      window.external.addFavorite("http://"+document.location.host+"/",document.title);   
   }else if (window.sidebar){   
      window.sidebar.addPanel(document.title,"http://"+document.location.host+"/", "");   
   }   
}   

function SetHomepage(){//设为首页   
   if(document.all){   
      document.body.style.behavior="url(#default#homepage)";   
      document.body.setHomePage("http://"+document.location.host+"/");   
   }   
   else if(window.sidebar){   
      if(window.netscape){   
             try{   
               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");   
             }   
             catch(e){   
               alert("您的浏览器未启用[设为首页]功能,开启方法:先在地址栏内输入about:config,然后将项 signed.applets.codebase_principal_support 值该为true即可");   
             }   
      }   
      var prefs=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);   
      prefs.setCharPref("browser.startup.homepage","http://"+document.location.host+"/");   
   }

}

function transferNew(id) {
    if ('False' == 'True') {
      unameVailShow();
    }
    else {
      if (CurrentUserID != 0 && CurrentUserID != 112418) {
            //            var asktitle = document.getElementById(id);
            //            window.open('http://ask.soufun.com/ask/Ask_StepTwo.aspx?asktitle=' + asktitle.value);
      }
      else {
            var poplogin = document.getElementById("Login");
            var asktitle = document.getElementById(id);
            var stringreturn = 'http://ask.soufun.com/ask/Ask_StepTwo.aspx?asktitle=' + asktitle.value;
            if (poplogin) {
                poplogin.src = "login.aspx?return=" + stringreturn;
            }
            window.document.popups['UserLogin'].open();
            return false;
      }
    }
}

function transfer(id)
{
      if('False'=='True')
            {         
            unameVailShow();   
            }
            else
            {
if(CurrentUserID!=0&&CurrentUserID!=112418)
{
var asktitle=document.getElementById(id);
window.open('http://ask.soufun.com/ask/Ask_StepTwo.aspx?asktitle='+asktitle.value);
}
else
{      
      var poplogin = document.getElementById("Login");
      var asktitle=document.getElementById(id);
         varstringreturn = 'http://ask.soufun.com/ask/Ask_StepTwo.aspx?asktitle=' +asktitle.value;
      if (poplogin) {
            poplogin.src = "login.aspx?return="+stringreturn;
      }
      window.document.popups['UserLogin'].open();
      return false;   
}
}
}



window.onload=function(){
    SetCssNone();
    var url=window.location.href;
    if(url.indexOf("Default")>0||url.indexOf("asklist")>0||url.indexOf("userorder")>0)
    {
      document.getElementById("menu0").className="current_menu";
    }
    else if(url.indexOf("house")>0)
    {
      document.getElementById("menu1").className="current_menu";
    }
   else if(url.indexOf("esf")>0)
    {
      document.getElementById("menu2").className="current_menu";
    }
    else if(url.indexOf("rent")>0)
    {
      document.getElementById("menu3").className="current_menu";
    }
    else if(url.indexOf("home")>0)
    {
      document.getElementById("menu4").className="current_menu";
    }
    else if(url.indexOf("/life/")>0)
    {
      document.getElementById("menu5").className="current_menu";
    }
    else if(url.indexOf("baike")>0||url.indexOf("loupan")>0||url.indexOf("lpbk")>0)
    {
      document.getElementById("menu6").className="current_menu";
    }
    else if(url.indexOf("231")>0){
      document.getElementById("menu7").className="current_menu";
    }
    else if(url.indexOf("30")>0){
      document.getElementById("menu8").className="current_menu";
    }
}
function SetCssNone()
{
    var menuList = $("divMenu").getElementsByTagName("li");
    for(var i=0; i<menuList.length; i++) {
   menuList.className='font_white';
    }
}

//方法说明:url编码
function url_encode(val) {
    var r = "";
    //alert(val);
    for (var i = 0; i < val.length; i++) {
    //alert(val.length);
    //alert(val.charAt(i));
      var code = "" + GetByteCode(val.charAt(i));
         //alert(code);
      if (code.length > 2) {
            var b1 = code.substr(0, code.length - 2);
            var b2 = code.substr(code.length - 2);

            if (i == 0) {

                //alert("" + code + ", " + b1 + ", " + code.length + ", " + b2);

            }

            r += "%" + b1 + "%" + b2;

      } else {

            r += "%" + code;

      }

    }

    return r;
}


</script>


    <!--自适应背景顶部 部分 end-->
    <!--内容 部分 begin-->
    <div class="box">
      <div class="box_left">
            <div class="box_left_nav font_gray" style="font-size: 12px;">
                → <a href="/ask/">搜房问答</a> > 提问</div>
            <!--提问 开始-->
            <div class="box_left1 height790">
                <form id="form1" method="post" action="Ask_StepThree.aspx">
                  <div class="boxtop2_title boxtop1">
                        <strong>提问</strong></div>
                  <div class="box_left1_down">
                        <table cellspacing="0" cellpadding="0" border="0" width="100%" class="tiwen_table">
                            <tbody>
                              <tr valign="top">
                                    <td nowrap="nowrap" align="left" width="17%" valign="top">
                                        <b class="ttc">您的问题:</b></td>
                                    <td id="td1" class="tdof">
                                        <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                          <tbody>
                                                <tr>
                                                    <td height="25" align="left" width="320" valign="top" class="tiw_kuai">
                                                      <input value="你好吗71947" style="width: 320px; height: 16px;" onblur="oninputtitleend()"
                                                            onkeyup="funsearch(this)" id="inputasktitle" name="asktitle" class="f14" /><span
                                                                id="spMsg"></span></td>
                                                    <td align="left" width="180" valign="top" class="tiw_kuai">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="padding-right: 25px;" colspan="2">
                                                    </td>
                                                </tr>
                                          </tbody>
                                        </table>
                                    </td>
                              </tr>
                              <tr>
                                    <td height="5" colspan="2">
                                    </td>
                              </tr>
                              <tr valign="top">
                                    <td nowrap="nowrap" align="left" width="17%">
                                        <b class="ttc">问题补充:</b></td>
                                    <td>
                                        <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                          <tbody>
                                                <tr>
                                                    <td class="tiw_kuai" colspan="2">
                                                      <textarea id="co" name="co" rows="20" cols="100"></textarea>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="30" align="left" valign="middle">
                                                      <span class="tips">插入本地:<a class="aimage" id="btn_upimg" title="上传图片" href="javascript:void(0);">图片</a></span></td>
                                                </tr>
                                                <tr>
                                                    <td height="30" align="left" valign="middle">
                                                      <span class="font_gray">可输入4000字,问题说明越详细,回答也会越准确!参见</span> <span class="blue2"><a
                                                            target="_blank" href="/ask/help.html">如何提问</a></span>
                                                    </td>
                                                </tr>
                                          </tbody>
                                        </table>
                                    </td>
                              </tr>
                              <tr>
                                    <td height="100%" colspan="2">
                                    </td>
                                    <input type="hidden" value="2" id="cid" name="cid" />
                              </tr>
                              <tr valign="top" style="display: none;" id="xuanze">
                                    <td nowrap="nowrap" align="left" width="17%">
                                        <b class="ttc">问题分类:</b></td>
                                    <td id="td3" class="tdof">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                          <tr valign="top">
                                                <td width="15%">
                                                    <div class="tiwen2 tiw_kuai">
                                                      <select id="Class_Grade1" style="width: 125px" size="8" name="Class_Grade1">
                                                            <option selected></option>
                                                      </select>
                                                    </div>
                                                    <td width="5%" align="center" valign="middle">
                                                      <div>
                                                            <b>→</b></div>
                                                    </td>
                                                    <td width="17%">
                                                      <div class="tiwen2">
                                                            <select id="Class_Grade2" style="width: 125px" size="8" name="Class_Grade2">
                                                                <option selected></option>
                                                            </select>
                                                      </div>
                                                    </td>
                                                    <td width="6%" align="center" valign="middle">
                                                      <div id="jiantou">
                                                            <b>→</b></div>
                                                    </td>
                                                    <td width="1%">
                                                    </td>
                                                    <td width="19%">
                                                      <select id="Class_Grade3" style="width: 125px" size="8" onchange="getCidValue();"
                                                            name="Class_Grade3">
                                                            <option selected></option>
                                                      </select>
                                                    </td>
                                                    <td width="32%">
                                                    </td>
                                          </tr>
                                          <tr valign="top">
                                                <td align="left" valign="middle" class="tiw_biaozhu" colspan="5">
                                                    请您选择正确的分类,以使您的问题尽快得到解答。</td>
                                          </tr>
                                        </table>
                                    </td>
                              </tr>
                              

<script language="javascript" type="text/javascript">
function getCidValue()
{
        var _cl1 = $("Class_Grade1");
        var _cl2 = $("Class_Grade2");
        var _cl3 = $("Class_Grade3");
        var _cid = $("cid");
       
        if(_cl1.value!=0) _cid.value = _cl1.value;
        if(_cl2.value!=0) _cid.value = _cl2.value;
        if(_cl3.value!=0) _cid.value = _cl3.value;
}
var g_Class_Grade1;
var g_Class_Grade2;
var g_Class_Grade3;


{
Class_Grade1.options = new Option("不选", "");
    for(i=0; i<class_level_1.length; i++) {
      Class_Grade1.options = new Option(class_level_1, class_level_1);
    }
//Class_Grade1.options.selected = true;
    Class_Grade1.length = i;
}

function FillClass_Grade2(Class_Grade2, class_level_1_id)
{
    Class_Grade2.options = new Option("不选", "");
   var count = 1;
    for(i=0; i<class_level_2.length; i++) {
      if(class_level_2.toString() == class_level_1_id) {
            Class_Grade2.options = new Option(class_level_2, class_level_2);
            count = count+1;
      }
    }
    Class_Grade2.options.selected = true;
    Class_Grade2.length = count;
}

function FillClass_Grade3(Class_Grade3, class_level_2_id)
{
    Class_Grade3.options = new Option("不选", "");
    var count = 1;
    for(i=0; i<class_level_3.length; i++) {
      if(class_level_3.toString() == class_level_2_id) {
            Class_Grade3.options = new Option(class_level_3, class_level_3);
            count = count+1;
      }
    }
    Class_Grade3.options.selected = true;
    Class_Grade3.length = count;      
}

function Class_Grade2_onchange()
{
    FillClass_Grade3(g_Class_Grade3, g_Class_Grade2.value);
    if (g_Class_Grade3.length <= 1) {
   g_Class_Grade3.style.display = "none";
       document.getElementById("jiantou").style.display = "none";
    }
    else {
   g_Class_Grade3.style.display = "";   
       document.getElementById("jiantou").style.display = "";       
    }   
        getCidValue();

}

function Class_Grade1_onchange()
{
        FillClass_Grade2(g_Class_Grade2, g_Class_Grade1.value);
    Class_Grade2_onchange();
    getCidValue();       
}

function InitClass_GradeList(Class_Grade1, Class_Grade2, Class_Grade3)
{

        g_Class_Grade1=Class_Grade1;
    g_Class_Grade2=Class_Grade2;
    g_Class_Grade3=Class_Grade3;
   
    g_Class_Grade1.onchange = Function("Class_Grade1_onchange();");
    g_Class_Grade2.onchange = Function("Class_Grade2_onchange();");
    FillClass_Grade1(g_Class_Grade1);

        var height = (g_Class_Grade1.options.length * 15 + (!(window.attachEvent && !window.opera) ? 30 : 10)) + 'px';
        g_Class_Grade1.style.height=height;
        g_Class_Grade2.style.height=height;
        g_Class_Grade3.style.height=height;
    Class_Grade1_onchange();

   
}

InitClass_GradeList($("Class_Grade1"), $("Class_Grade2"), $("Class_Grade3"));

// auto-select the init class if need
var selected_id_list="0"
var blank_pos = selected_id_list.indexOf(" ");
var find_blank = true;
if (blank_pos == -1) {
    find_blank = false;
    blank_pos = selected_id_list.length;
}
var id_str = selected_id_list.substr(0, blank_pos);
g_Class_Grade1.value = id_str;
Class_Grade1_onchange();

if (find_blank == true) {
    selected_id_list = selected_id_list.substr(blank_pos + 1,
      selected_id_list.length - blank_pos - 1);
    blank_pos = selected_id_list.indexOf(" ");
    if (blank_pos == -1) {
      find_blank = false;
      blank_pos = selected_id_list.length;
    }
    id_str = selected_id_list.substr(0, blank_pos);
    g_Class_Grade2.value = id_str;
    Class_Grade2_onchange();

    if (find_blank == true) {
      selected_id_list = selected_id_list.substr(blank_pos + 1,
            selected_id_list.length - blank_pos - 1);
      blank_pos = selected_id_list.indexOf(" ");
      if (blank_pos == -1) {
            find_blank = false;
            blank_pos = selected_id_list.length;
      }
      id_str = selected_id_list.substr(0, blank_pos);
      g_Class_Grade3.value = id_str;
    }
}

$("Class_Grade1").options.selected = true;
Class_Grade1_onchange();
</script>

<script type="text/javascript">
    var _aa = document.getElementsByName("ra");
        if(_aa.length>0){
                document.write("<a href='javascript:void(0)'onClick=window.open('/q?ct=21&cm=9&word=%D6%DB%C7%C5&tn=ikchangeclass','','width=450,height=300,scrollbars=1');>更改分类</a>");
                _aa.checked=true;
        }
</script>


                               " align="middle" width="17%">
                                    </td>
                                    <td height="20" align="left" valign="middle" class="tiw_biaozhu">
                                        <span class="font_gray">悬赏分越高,您的问题会越受关注,从而得到更佳答案。</span></td>
                              </tr>
                              <tr valign="top">
                                    <td nowrap="nowrap" height="20" align="middle" width="17%">
                                    </td>
                                    <td height="20" align="left" valign="middle" class="tiw_biaozhu">
                                        <span id="checkcode" style="display: none">验证码:&nbsp;&nbsp;<input name="VCode" type="text" id="VCode" size="12" onblur="checkVcode(this.value.toUpperCase())" tabindex="3" style="vertical-align: middle; width: 83px; text-transform: uppercase;" />&nbsp;<img
                                                id="imgcode" name="imgcode" src="include/VCode.aspx?question=true" />&nbsp;<a id="VCodeButton"
                                                    href="javascript:;">看不清,换一张</a></span>
                                    </td>
                              </tr>
                              <tr valign="top">
                                    <td height="40" align="center" valign="bottom" colspan="2">
                                        <input class="btn_search" type="button" onclick="questionSubmit()" value="提 交" style="vertical-align: middle;" /></td>
                              </tr>
                              <tr valign="top">
                                    <td nowrap="nowrap" height="20" align="middle" colspan="2">
                                    </td>
                              </tr>
                            </tbody>
                        </table>
                  </div>
                </form>
            </div>
            <!--提问 结束-->
            <div class="blank10" style="display: none;">
            </div>
      </div>
      <!--内容左栏 end-->
      <!--内容右栏 begin-->
      <div class="boxthree">
            <div class="box_left_nav">
            </div>
            <!--右栏搜房精彩推荐 begin-->
            <div class="boxthree2 height800">
                <div class="boxtop">
                  <div class="boxtop1_more" style="font-size: 12px; font-weight: normal;" id="linkMore">
                  </div>
                  相关已解决问题</div>
                <div class="boxthree2down" id="searchresult">
                </div>
            </div>
            <!--右栏精彩推荐 end-->
      </div>
      <!--内容右栏 end-->
      <div class="clear">
      </div>
    </div>
    <!--内容 部分 end-->
   
    <!--搜索 部分 begin-->
    <div class="sousuo">
      <form method="get" action="http://www.soufun.com/ask/search.aspx" id="search">
      请输入您的问题:<input id="asktitle1" name="asktitle" type="text" style="vertical-align:middle;"class="ask_input"value="你好吗71947"/>
      <input class="btn_search" type="button" value="搜 索" style="vertical-align:middle;" onclick="document.getElementById('search').submit()"/>
         <input class="btn_ask" type="button" value="提 问" style="vertical-align:middle;" onclick="transfer('asktitle1')" id="ask_33"/>
         
            
      
            </form>
    </div>
    <!--搜索 部分 end-->
<!--20091020搜房网统一版尾-->
<style type="text/css">
.DivCss20091020WZiColor333 a:link{color:#333;text-decoration:none;}
.DivCss20091020WZiColor333 a:visited{color:#333;text-decoration:none;}
.DivCss20091020WZiColor333 a:hover{color:#f00;text-decoration:underline;}
.DivCss20091020WZiColor333 a:active{color:#f00;}
.DivCss20091020WZiColorf00 a:link{color:#f00;text-decoration:none;}
.DivCss20091020WZiColorf00 a:visited{color:#f00;text-decoration:none;}
.DivCss20091020WZiColorf00 a:hover{color:#f00;text-decoration:underline;}
.DivCss20091020WZiColorf00 a:active{color:#f00;}
</style>
<script type="text/javascript">
var $=function(id) {
   return document.getElementById(id);
}
function moreBoxto(numcss1020){
        for (j=0; j<10; j++){
       if($('moreBox' + j)){
       $('moreBox'+j).style.display='none';

       }
        }
        $('moreBox'+numcss1020).style.display='block';
}
function hidden_moreBoxto(numcss1020) {
        timeout = setTimeout(function() {$("moreBox"+numcss1020).style.display = "none";},100);
}
function show_moreBoxto(numcss1020){
        window.clearTimeout(timeout);
        $("moreBox"+numcss1020).style.display = "";
}
</script>

                        </table>
                        <div style="text-align:right;" class="DivCss20091020WZiColorf00"><a href="http://www.soufun.com/SoufunFamily.htm" target="_blank">进入搜房家族&gt;&gt;</a></div>
                </div>
        </div>
        <!--弹出城市 end-->
        <div style="font-family:Verdana;line-height:20px;text-align:center;">copyright &copy; <span id="thisyear"><script type="text/javascript">document.write(new Date().getFullYear()); </script></span>SouFun.com Limited, All Rights Reserved</div>
        <div style="line-height:23px;text-align:center;position:relative;">搜房公司 版权所有<a target="_blank" href="http://www.hd315.gov.cn/beian/view.asp?bianhao=0102000110800002"><img style="border:0pt none;position:absolute;right:249px;top:-18px;" src="http://img.soufun.com/ggcp/ask/images/beian_min.gif"/></a></div>
        <div style="line-height:20px;text-align:center;">举报电话:<span style="font-family:Verdana;">010-59306587</span> 举报邮箱:<a href="mailto:jubao@soufun.com" style="font-family:Verdana;">jubao@soufun.com</a></div>
</div>
</div>
<script type="text/javascript" src="http://imgs.soufun.com/pic/Album/include/Root.Popup.js"></script>
    <script type="text/javascript">
      window.onload = function() {
            AlarmLogin();
            document.getElementById("ask_32").style.opacity = 1;            
      }
    </script>
</body>
</html>

<script type="text/javascript">
    var isMsg;
//验证码确认
function checkVcode(vcodevalue){
jQuery.ajax({
type:"GET",
                url: "Ask_StepTwo.aspx?fresh=" + Math.random(),
                data:"vcodevalue=" + vcodevalue,
                success:function(msg){if(msg=="False"){alert("验证码错误");jQuery("#VCode").val("");}}
});
}

//提交问题时判断长度
function questionSubmit(){

var content=editor.getSource();
var titleContent=jQuery.trim(jQuery("#inputasktitle").val());
if(2>=20)
{
if(jQuery("#VCode").val()==""){
alert("请输入验证码");
return false;
}
}

if(titleContent==""){
alert("输入问题长度需大于5小于30")
jQuery("#inputasktitle").focus();
return false;
}
else
{
if(titleContent.length<5||titleContent.length>30){
alert("输入问题长度需大于5小于30");
jQuery("#inputasktitle").focus();
return false;
}
}

if(content!=""){
if(content.length<5||content.length>4000){
alert("输入内容长度需大于5小于4000");
editor.focus();
return false;
}
}
else
{
//alert("输入内容长度需大于5小于4000");
//return false;
}
document.getElementById('form1').submit();
}

//插入本地图片

document.writeln("<PicturesUploader id=\"PicturesUploader1\"");
document.writeln("City=\'北京\'");
document.writeln("Channel=\'ask\' ");
document.writeln("OpenButton=\"btn_upimg\" ");
//document.writeln("ThumbFormat=\"o\"");
document.writeln("PrivacyState=\"1\"");
document.writeln("Action=\'http://ask.soufun.com/ask\/MultiUserPicturesUploadFinish.aspx\'");
document.writeln(" Albumid=\"0\"");
document.writeln(" onclose=\"upclose()\"");
document.writeln("OnBind=\"return true;\" ");
document.writeln("OnOpen=\"return true;\" ");
document.writeln(" ><\/PicturesUploader>");

document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/imgs.soufun.com\/pic\/Album\/include\/Root.Popup.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/imgs.soufun.com\/pic\/Album\/include\/Gallery.PicturesUploader.Popup.js\"><\/script>");


        function upclose()
        {
                //alert(document.picturesUploader.ids);   //相册里的图片id
                //alert(document.picturesUploader.urls);         //图片url
      //alert(document.picturesUploader.details);        //个人相册图片详情页地址。
   
      upl=document.picturesUploader;
      
         var imglen = upl.urls.length-1;
                   
                for( var i = 0; i < imglen+1 ; i++)
                {          
                        var strHtml="<a href='"+ upl.details +"' target='_blank'><img onload='Image.Resize(this,400,400);' src='" + upl.thumbs + "' border='0' /></a>";
                        editor.appendHTML(strHtml);                       
                }
    }       


var editor;
    jQuery(function(){
      jQuery('#co').xheditor({tools:'GStart,Bold,Italic,Underline,About,GEnd',skin:'vista',internalScript:false,inlineScript:true,internalStyle:false});
      editor = jQuery('#co').editor;
      jQuery("#VCodeButton").bind("click", function(){window.setTimeout('GetVCode()', 10)});
      //当标题不为空时,将问题分类显示出来
      if(title!="")
      {
      oninputtitleend();
      }               
      }
    );
   
</script>

cxlater 发表于 2011-5-22 20:09:21

为什么总有人喜欢这样问问题
页: [1]
查看完整版本: textarea 搞一天了,没办法了,上来求助一下(我要输入文本到textarea )