我试图为RTE字段设置一个值,但是它不会使用这个值。这一行:Ae2.val(Ae1);//甚至这是行不通的:Ae2.val(“测试”);任何想法。谢谢
function PreSaveAction()
{
$(document).ready(function() {
var Ae2 = $("#ctl00_m_g_1b07d546_aec6_4582_b36d_9bfe97fc36e0_ff26_1_ctl00_ctl00_TextField_inplacerte");
//SharePoint's Rich text editor
alert("Ae2 before set val: \n" + Ae2.html());
Ae2.val(Ae1); // even this will not work: Ae2.val("Test");
alert("Ae2 after set val: " + Ae2.html());
});
return true;
}发布于 2013-11-15 07:23:45
请按以下方式尝试
$('iframe[id^="ctl00_m_g_1b07d546_aec6_4582_b36d_9bfe97fc36e0_ff26_1_ctl00_ctl00_TextField_inplacerte"]').contents().find("body").html("Test");https://stackoverflow.com/questions/19987707
复制相似问题