JS has no permissions

Source: Internet
Author: User

When using the Lhgdialog control to spread values across pages, you need to add the data selected in the pop-up window using the check box to the Select (drop-down list) of the parent page. Then the problem arises, the data transfer is not a problem, the option is added in the Select, but the problem occurs when you use the script to remove the value of the drop box as follows:

var _names = document.getElementById (' # # # '); var _pirec = "";  for (i = 0; i < _names.length; i+++ + _names.options[i].value + ";" ;} $ ("# # #"). Val (_pirec);

In the execution of _names.options[i].value reported JS no permissions, and then find it online. The result is more than n (almost all cross-domain issues), but none of them solves the problem.

And then there's no reason to look everywhere.

Eventually the blind Cat ran into a dead mouse (haha) accidentally put the pop-up window JS add option code changed to jquery suddenly found the right

W.document.getelementbyid ("# # #"). Options.add (new  Option (# #, # #)); Change to $ ("# # #", Parent.document). Append ("<option value=" + # # + ">" + ##+ "</option>");

But the specific reason, still did not find, eh ....

JS has no permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.