我在js里执行eval(tempstr);
tempstr的值是
"top.fight("{"aged":0,"aplayerid":10000,"attackdata":0,"attackdesc":"<font color='#CC0066'>你好。<\/font>","deadstr":"0","dedata":0,"fighthtml":"10000,流氓,\/Images\/tempImages\/random12.gif,NPC","mattri":{"pcinner":0,"pclife":5679,"pinner":3818,"plife":3408,"pminner":4032,"pmlife":5679},"otherinner":0,"pattri":{"pcinner":0,"pclife":21696,"pinner":1459,"plife":21594,"pminner":1791,"pmlife":21696}}");"
服务端生成的过程是
serializer = new DataContractJsonSerializer(typeof(FightShowInfo));
stream = new MemoryStream();
serializer.WriteObject(stream, pShowInfo);
stream.Position = 0;
sr = new StreamReader(stream);
Result = sr.ReadToEnd();
Result是传到客户端的值求解
tempstr的值是
"top.fight("{"aged":0,"aplayerid":10000,"attackdata":0,"attackdesc":"<font color='#CC0066'>你好。<\/font>","deadstr":"0","dedata":0,"fighthtml":"10000,流氓,\/Images\/tempImages\/random12.gif,NPC","mattri":{"pcinner":0,"pclife":5679,"pinner":3818,"plife":3408,"pminner":4032,"pmlife":5679},"otherinner":0,"pattri":{"pcinner":0,"pclife":21696,"pinner":1459,"plife":21594,"pminner":1791,"pmlife":21696}}");"
服务端生成的过程是
serializer = new DataContractJsonSerializer(typeof(FightShowInfo));
stream = new MemoryStream();
serializer.WriteObject(stream, pShowInfo);
stream.Position = 0;
sr = new StreamReader(stream);
Result = sr.ReadToEnd();
Result是传到客户端的值求解
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货