开发者

How do I add a body onload javascript function for a create content page in drupal?

开发者 https://www.devze.com 2022-12-22 18:27 出处:网络
I want assign certain val开发者_StackOverflowues to some of the cck fields through Java script while the form is loaded. I think it is best to use the body/ form onload attribute. But how do i define

I want assign certain val开发者_StackOverflowues to some of the cck fields through Java script while the form is loaded. I think it is best to use the body/ form onload attribute. But how do i define that in drupal? Could someone help me with this or a better solution?


As with many other tasks, Drupal has its own 'way' of handling JavaScript functionality within a site. It needs a little bit of learning and 'getting used to', but pays of in the long run.

Start with JavaScript in Drupal and work through the articles linked from there. Also, don't miss this overview of the JavaScript API.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号