-2
jQuery函数我有功能需要从C#调用从C#
$('.image-cropper').each(linkUp);
叫任何人都可以解释它如何能做到低于。我试着用下面的代码
String csname1 = "PopupScript";
Type cstype = this.GetType();
ClientScriptManager cs = Page.ClientScript;
StringBuilder cstext2 = new StringBuilder();
cstext2.Append("<script type=\"text/javascript\"> $('.image-cropper').each(linkUp); </");
cstext2.Append("script>");
cs.RegisterClientScriptBlock(cstype, csname1, cstext2.ToString(), false);
但它没有工作。
什么没有工作? –
@rick Schott它没有调用函数 – Krishh
您可能需要将JS包装在'$(document).ready()'中,以便在尝试选择元素时加载DOM – Clive